Oh, one more question on this Alex. If you run the test, you'll see the selectedIndex changes when setting the selectedIndices. I don't show it in this example but even if I saved it off (-1) and set it, it will still change to 0. I bothers me that it's not symmetric - not sure if it's a problem or not.

thanks
charles

On Oct 1, 2007, at 4:14 PM, Alex Harui wrote:

You fell into a hole created by our attempt to allow you to specify selectedIndex/Indices on the MXML tag and set the collection later after a server fetch. Having a collection of length=0 queues the selection request so it got applied after you set it later. A workaround would be:



// simulate delete all then add back

dataCollection.removeAll();

if ( clearData.selected )

list.selectedIndices = new Array();

                                                list.invalidateList();

                                                setData();

if ( clearData.selected )

list.validateNow();



Reply via email to