Hi,

The Array collection doesn't autoexpand.

Either create an array of empty elements a a specified length or you could
extend the ArrayCollection and add that functionality.

It probably wouldn't be that difficult.

Peace, Mike

On 1/4/07, Ryan Stewart <[EMAIL PROTECTED]> wrote:

  I'm trying to insert an object at a specific index of an empty array. I
am accessing the array as an ArrayCollection and using the addItemAt()
function which I thought was supposed to expand the array automatically.
From the docs ( 
http://livedocs.macromedia.com/flex/2/langref/mx/collections/ListCollectionView.html#addItemAt()
)


"Adds the item at the specified index. Any item that was after this index
is moved out by one. If the list is shorter than the specified index, it
will grow to accommodate the new item."


But whenever I try to put something in the 6th position of an empty array,
it throws an index out of bounds error. Am I misunderstanding the
addItemAt() function or am I doing something wrong?


=Ryan



--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.

Reply via email to