Are you expecting to see the new item because the HList isn't full of
items yet, or are you expecting it to expand to show it.  It might not
grow to show w/o calling invalidateSize()

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Wednesday, April 23, 2008 10:29 AM
To: [email protected]
Subject: [flexcoders] Changing DataProvider on HorizontalList component

 

Hi, all;

I have an XMLListCollection I am using as the dataprovider for a 
HorizontalList. I am not using databinding, so I am setting the 
dataProvider in AS. When I add an item and refresh the 
XMLListCollection, I expect to see the additional ItemRenderer on the 
screen. I can see that the XMLListCollection contains the new item, 
and I can see that code executes inside the existing ItemRenderers 
when I refresh the collection, but the last loop never happend for 
the new data item.

This is my function to add a new item:

public function addSolution():void{
var s:XML=
<solution id="0">
<column num="1">
</column>
<column num="2">
</column>
<column num="3">
</column>
<column num="4">
</column>
</solution>;
solutionsXMLListCollection.addItem(s)
allSolutions.invalidateList();
solutionsXMLListCollection.refresh();
trace('addSolution');
}

What am I missing?

Thanks;

Amy

 

Reply via email to