How do I initialize a vector with an array of values?
I tried this and it complies fine, but does not work!
langs = new Vector.<String>(["en","fr"]);
I also need to load an arbitrary array into a vector, like this:
langlist = ["en","fr"];
langs = new Vector.<String>(langlist);
Is there a way to do this?
Edit: How do I initialize a 2D vector with a 2D array of values?
numbers = [[10,20,30], [10,20,30]];
nums = Vector.<Vector.<Number>>(numbers);
I tried this but it gives me the error:
TypeError: Error #1034: Type Coercion failed
langs
is strongly-typed as a vector of type string, and after I step over the line in FlashDevelop, the values don't show up in the Watch window, and the length is 0. – Randallrandan