This approach can certainly get complicated. For your original idea, you could still have four states, but they would be composite; redOpen, redClosed, blueOpen, blueClosed. I know that this is just a hypothetical scenario, but I would go with binding (Caringorm) for styles instead of states.
.02, -TH --- In [email protected], "Jean-Luc ESSER" <[EMAIL PROTECTED]> wrote: > > Thanx Jason, but my question was global. > > Of course i can find a way of doing this particular task by binding colors or whatever. > What i was trying to find is a best practice for such situations. > > This example was just for making a point. > Using it in a Cairngorm architecture would make sens. > > Any ideas ? > > > ----- Original Message ----- > From: Jason Hawryluk > To: [email protected] > Sent: Thursday, June 22, 2006 5:16 PM > Subject: RE: [flexcoders] How to have multiple states in same component ? > > > > If we were to assume that we could (which we can) actually bind the background color in the state to a variable, then you could do it. Otherwise yes you would require a separate state for each. Which is logical because up, down, red, blue signify each a separate state. Binding color variables may be what your after. > > > > Interesting to try out, there may be a way. Not sure :) > > > > > > -----Message d'origine----- > De : [email protected] [mailto:[EMAIL PROTECTED] la part de Jean-Luc ESSER > Envoyé : jeudi 22 juin 2006 15:58 > À : [email protected] > Objet : [flexcoders] How to have multiple states in same component ? > > > > How would you deal with multiple states in the same component ? > Imagine a panel wich has states like state 1 is opened and state 2 is closed. > Now i would imagine a state 3 is blue and state 4 is red. > But i cannot mix them because currentState takes only one value ! > Only way out is defining a state open and red, open and blue, closed and red, closed and blue ! > > What if i want to have one instance of states defining open/close, and another instance red/blue ?? > > I cannot see a way of doing this. > > Best, > Jean-Luc. > ------------------------ Yahoo! Groups Sponsor --------------------~--> Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

