Hello all,

I'm using an array collection as a data provider for a list component with a 
custom itemRenderer.  If I use arrayCollection.addItemAt(), a new instance of 
the itemRenderer class is created.  If I use arrayCollection.setItemAt, the 
current instance for that particular item is updated, meaning the data property 
is set.  This all seems normal.

It seems that the first time I run setItemAt(), another instance of the 
itemRender class is created in it's place, despite the index of the item not 
changing.  (It's just an icon or text, etc.)  Every subsequent time I call 
setItemAt(), the data property is updated without creating a new instance, but 
the first time, it's as if I'm adding an item to the list in the same location.

It breaks down as there are instance vars in the itemRenderer I'm depending on.

Thanks,
Brandon



      

Reply via email to