It is a bug that you can have selectedIndices but that selectedIndex =
-1.  Please file a bug for that.

 

Thanks,

-Alex

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Charles Galpin
Sent: Monday, October 01, 2007 4:24 PM
To: [email protected]
Subject: Re: [flexcoders] TileList.selectedIndices problem

 

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