Good. Try scrollToIndex()
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Richard Rodseth Sent: Wednesday, September 19, 2007 5:04 PM To: [email protected] Subject: Re: [flexcoders] Setting selectedIndex It did the trick, and designating uniqueness of my proxies by implementing IUID makes perfect sense. I half expected something like this to happen, but I did the proxy list early on, and had not had any other issues with it. Now I just need to figure out how to scroll the selection into view. Thanks again. On 9/19/07, Alex Harui <[EMAIL PROTECTED] <mailto:aharui%40adobe.com> > wrote: > We use UID for selection mgmt, but there still might be issues in setting > selectedItem, selectedIndex, so no guarantees > > > > ________________________________ > > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of Richard Rodseth > Sent: Wednesday, September 19, 2007 3:28 PM > > To: [email protected] <mailto:flexcoders%40yahoogroups.com> > Subject: Re: [flexcoders] Setting selectedIndex > > > > > > > > Excellent. I see this is explained here: > > http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhel p.htm?context=LiveDocs_Book_Parts&file=about_dataproviders_057_02.html <http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhe lp.htm?context=LiveDocs_Book_Parts&file=about_dataproviders_057_02.html> > > I'll look into implementing IUID. Many thanks. > > On 9/19/07, Alex Harui <[EMAIL PROTECTED] <mailto:aharui%40adobe.com> > wrote: > > > > > > > > > > > > > > > > > > > > The list relies on uids, If your proxy has the same uid for an index that > > might help > > > > > > > > ________________________________ > > > > > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> ] On > > Behalf Of Richard Rodseth > > Sent: Wednesday, September 19, 2007 3:11 PM > > To: [email protected] <mailto:flexcoders%40yahoogroups.com> > > Subject: Re: [flexcoders] Setting selectedIndex > > > > > > > > > > > > > > > > Thanks Alex. I narrowed it down to my ProxyList, which returns a new > > (small) object each time getItemAt is called. I figured these would > > get garbage collected (and that getItemAt would only get called for > > visible items), but if the List component is hanging onto them and > > using them, that's not going to work. Is that the case? Or does List > > rely on IList methods (willTrigger perhaps?) that I may not have > > implemented correctly. > > > > I'd hate to give up my proxy list, unless there is a better way to > > handle large data sets. > > > > On 9/19/07, Alex Harui <[EMAIL PROTECTED] <mailto:aharui%40adobe.com> > wrote: > > > > > Should just work, but you can try calling invalidateList() (not > > > invalidateDisplayList()). > > > > > > > > > > > > I'd try it on a List outside of a Repeater. If that makes a difference, > > > check the recycling options on Repeater. > > > > > > > > > > > > ________________________________ > > > > > > > > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> ] On > > > Behalf Of Richard Rodseth > > > Sent: Wednesday, September 19, 2007 1:29 PM > > > To: [email protected] <mailto:flexcoders%40yahoogroups.com> > > > Subject: [flexcoders] Setting selectedIndex > > > > > > > > > > > > > > > > > > > > > I am able to clear the selection of a list programmatically, by > setting: > > > > > > myList.selectedIndex = -1 > > > > > > but setting the selection to a specific index is not working. The > > > previous highlighting goes away, and based on watching the list in the > > > debugger, the property does seem to change, but the new selection is > > > not highlighted. Do I need to invalidate something in addition to just > > > setting the property? > > > > > > In case it matters > > > - the list is inside a component which is repeated in a Repeater. > > > - there is an item renderer > > > - the data provider is a custom IList implementation. > > > > > > But all other use cases (user click, up-down arrows, clearing > > > selection programmatically) work perfectly. > > > > > > Thanks. > > > > > > > > > > > > > > > > > > > > > > > > > > >

