----- Original Message ----- From: "Amy" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, October 17, 2008 3:38 PM Subject: [flexcoders] Re: Rippling through state changes
> --- 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. Thanks Amy. > HTH; > > Amy > > > ------------------------------------ > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Alternative FAQ location: > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups > Links > > > >

