How to initialize a vector with an array of values?
I tried this and it respects perfectly, but does not work!
langs = new Vector.<String>(["en","fr"]);
I also need to load an arbitrary array into a vector, for example:
langlist = ["en","fr"]; langs = new Vector.<String>(langlist);
Is there any way to do this?
Edit: How to initialize a 2D vector using a 2D array of values?
numbers = [[10,20,30], [10,20,30]]; nums = Vector.<Vector.<Number>>(numbers);
I tried this, but it gives me an error:
TypeError: Error # 1034: Type forced input error
arrays flash vector actionscript-3 strong-typing
Robin rodricks
source share