--- In [email protected], "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>
> I have some custom components (nothing special) that are displaying 
product 
> information. essentially I can use the same component for seprate 
purposes:
> 
> Product info (each product can be added to the shopping cart), 
shopping cart 
> (each product can be removed from the cart). Within the main 
component, I 
> have TileLists or datagrdids with item renderers. When the custom 
component 
> flips between states, I need the individual items contained therein 
to 
> switch state too.
> 
> I'm trying to think of the most elegant way to do this. Any thoughs 
9apart 
> from the fact I'll go Doh! real soon now).
> 
> I've tended to avoid states, but seem to be embracing them big time 
now..

I'd look at the Button code and see how it uses stateful skins.  And 
I've found that using styles for this kind of thing works pretty 
well.  You can either extend TileList to pass through the appropriate 
style into the component or you can look at my TileList_withStyle 
component, available at http://flexdiary.blogspot.com.  Or you can 
just change the style declaration for your custom component on the 
fly to change the applicable style/state at runtime.

HTH;

Amy

Reply via email to