Hello all
I have created a simple application where I need to use states but the
states are not getting updated in the component views. Here is what I
did...
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
xmlns:views="com.views.*"><views:Login /></mx:Application>
<mx:Box xmlns:mx="http://www.adobe.com/2006/mxml";><mx:VBox
id="showBox"><mx:Label text="Login Screen" /></mx:VBox><mx:Button
label="Change state" click="currentState='errorState';"
/><mx:states><mx:State name="errorState"><mx:AddChild
relativeTo="{showBox}"><mx:Spacer height="10" /><mx:Label text="login
Error" /></mx:AddChild></mx:State></mx:states></mx:Box>
This should display the "Login Error" label on pressing the "Change
State" button. But the view doesn't change at all. What am I doing wrong
over here? Can somebody please help me out?
Thanks and RegardsShiVik

Reply via email to