0 Replies Latest reply on May 12, 2009 1:38 PM by Rony.Nair

    Unable to change state in a particular scenario



      I am relatively new to this forum, so I apologize if this was a topic  already discussed.


      1. I have a component MyTitleWindow that is based on TitleWindow. I defined a state inside MyTitleWindow - say "X"

      2. Next I created a component Dialog that is based on MyTitleWindow

      3. Next I create MyDialog which is based on Dialog . This class also has a state say "Y"


      So this is the class hierarchy

      MyTitleWindow -> Dialog -> MyDialog


      During run time I am able to set the current state of MyDialog to "Y" and it works fine

      But when I set current state to "X" flex throws an ArgumentError: Undefined state 'errorState'.exception !


      The funny thing is - If I remove state "Y" from MyDialog then state X works fine !!


      Attached is the sample code I wrote.


      Any idea how to fix this ?