Hi Alex, 

Thanks much for the lead.

What do you mean "virtualization"? Are you referring to recycling of the 
renderers?

The "fancy" stuff I am working on are supposed to be dealing with large amount 
of data while still showing more detailed view of some portions where the user 
is interested...

Another problem I am struggling with is whether to have my component determine 
the states of the item renderers. For example, how do you choreograph the 
transitions of all the item renderers involved (like shrinking the items that 
just lost focus and then expanding the item that just get focus)? It seems it 
should be the job of my component; but when an item renderer expands, it may 
mean to display more detailed information by switching to another state, which 
looks like it may be better handled by its own.

geng

--- In flexcoders@yahoogroups.com, Alex Harui <aha...@...> wrote:
>
> If you're doing some fancy stuff and don't need virtualization you can just 
> use a VBox.  You could probably fake a single selection model with states 
> pretty easily.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of gwangdesign
> Sent: Saturday, March 14, 2009 10:41 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: changes on item renderers on a List
> 
> 
> Hi Tracy,
> 
> Thanks for the heads-up. I was aware that list based components recycle their 
> item renderers. For example, when you scroll the list, it could break the 
> component if there are some renderers that were already in the expanded 
> states;)
> 
> I went ahead and did these in my component which subclasses List.
> 
> (Dictating states of listItemRenderers in the List subcomponent)
> http://maohao.com/blogs/wordpress/TestSimpleZoomableList/bin-release/TestSimpleZoomableList.html
> 
> (Letting the individual item renderers to decide which state they want to go)
> http://weblogs.macromedia.com/pent/archives/2006/04/a_list_itemrend.html
> 
> After all the struggle, I found out there are really _a lot_ going on under 
> the hood on a List/ListBase component (this includes "buffering" spare list 
> item renderers, managing scrolling, clipping, etc.) When I have some time, I 
> may just extend UIComponent, or hunt for some other components that are more 
> tolerant of transitions...:)
> 
> Thanks and have a nice weekend.
> 
> -geng
> 
> --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, 
> "Tracy Spratt" <tspratt@> wrote:
> >
> > I think I would approach this by having an "isExpanded" property on the
> > dataProvider items, and toggle that property using logic in a change
> > handler. The renderer would use that property to set its visual state.
> >
> >
> >
> > There won't be any clear relationship between selectedItems and the visual
> > renderers.
> >
> >
> >
> > Tracy Spratt,
> >
> > Lariat Services, development services available
> >
> > _____
> >
> > From: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com> 
> > [mailto:flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>] On
> > Behalf Of gwangdesign
> > Sent: Friday, March 13, 2009 6:05 PM
> > To: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] changes on item renderers on a List
> >
> >
> >
> > Hi,
> >
> > I am re-sending this question since this seemingly simple question has been
> > taking me a bit much longer than I expected;)
> >
> > I have a whole bunch of item renderers inside a List (or it lays out and
> > scrolls the renderers the way a List does). Here is what I am trying to do:
> > I'd like to expand/shrink these item renderers based on whether they are
> > newly "selected" or "de-selected". My approach right now is extending List
> > class. I listen to ListEvent.CHANGE event and invalidate my component as it
> > occurs. I then try to figure out which renderer has been
> > selected/deselected... and I can't.
> >
> > Basically my component is interested in the following actions:
> > 1. When "allowMultipleSelection" is true, user selects an item that hasn't
> > been selected yet;
> > 2. When "allowMultipleSelection" is true, user selects an already selected
> > item;
> > 3. When "allowMultipleSelection" is false, user selects a new item;
> > 4. When "allowMultipleSelection" is false, user selects an already selected
> > item;
> >
> > I poke into the code of mx.controls.ListBase and List and the code is a bit
> > over my head right now;)
> >
> > Any ideas? pseudo code is welcome!
> >
> > Thanks and have a great weekend!
> >
> > -geng
> >
>


Reply via email to