I have no idea how we managed without Vectors for so long … they are a great addition to the syntax.
However. As usual, the documentation leaves a lot to be desired … here’s an example from the LiveDocs, describing the third argument of Vector.splice() – it’s a loosely typed argument:
An optional list of one or more comma-separated values, or a Vector, to insert into the Vector at the position specified in the startIndex parameter.
So what exactly is “a list of comma-separated values”? Presumably a String, but do we really need to have to write code and see if it breaks in order to test the documentation? In any case, why allow a String representation of a list to be the value when the whole point of Vector is to restrict the data type? Strings and primitives can be derived from a comma-delimited list, but most objects cannot. So what’s the point?




AS3 function splice(startIndex:int, deleteCount:uint, … items):Vector.
The (…items) parameter allows you to pass in comma separated list which is passed into the function as an Array. It makes it possible to an arbitrary number of items to the Vector.
See (…rest) at the bottom of this page: http://livedocs.adobe.com/flex/3/html/help.html?content=03_Language_and_Syntax_19.html
Ah I see what they mean, thanks. A “variable number of arguments” would be a better way of putting it. “Comma separated” is poor phrasing. ActionScript docs have always been terrible; they’re better now than they used to be, but still leave a lot to be desired.