mech7
%Europe/Berlin %830 %2006, 20:56
Ik ben een video van lynda.com aan het kijken daar gebruiken ze Flex 2 beta 3.. maar ik heb een probleem met de statemanager die werkt gewoon niet ook niet al pak ik hun finished
demo.. hier is de code weet iemand wat hier niet aan klopt?
Volgens mij mag .this weg althans dat wordt niet gebruikt in de handleiding van flex maar zelfs al haal ik dat weg werkt het nog niet :(
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:states>
<mx:State name="registerForm">
<mx:AddChild relativeTo="{controlbar1}" position="before">
<mx:HBox width="100%">
<mx:Label text="Name:" width="75"/>
<mx:TextInput id="nameInput"/>
</mx:HBox>
</mx:AddChild>
<mx:SetProperty target="{myPanel}" name="title" value="Please Register"/>
<mx:SetProperty target="{submitButton}" name="label" value="Register"/>
<mx:SetProperty target="{linkbutton1}" name="label" value="Login"/>
<mx:SetEventHandler target="{linkbutton1}" name="click" handler="this.currentState=''"/>
</mx:State>
</mx:states>
<mx:Panel id="myPanel" title="Please Log In"
paddingLeft="10" paddingRight="10"
paddingTop="10" paddingBottom="10">
<mx:HBox width="100%">
<mx:Label text="User Name:" width="75"/>
<mx:TextInput id="userName"/>
</mx:HBox>
<mx:HBox width="100%">
<mx:Label text="Password:" width="75"/>
<mx:TextInput id="password"/>
</mx:HBox>
<mx:ControlBar id="controlbar1">
<mx:Button label="Login" id="submitButton"/>
<mx:Spacer width="100%"/>
<mx:LinkButton label="New User?" click="this.currentState='registerForm'" id="linkbutton1"/>
</mx:ControlBar>
</mx:Panel>
</mx:Application>
demo.. hier is de code weet iemand wat hier niet aan klopt?
Volgens mij mag .this weg althans dat wordt niet gebruikt in de handleiding van flex maar zelfs al haal ik dat weg werkt het nog niet :(
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:states>
<mx:State name="registerForm">
<mx:AddChild relativeTo="{controlbar1}" position="before">
<mx:HBox width="100%">
<mx:Label text="Name:" width="75"/>
<mx:TextInput id="nameInput"/>
</mx:HBox>
</mx:AddChild>
<mx:SetProperty target="{myPanel}" name="title" value="Please Register"/>
<mx:SetProperty target="{submitButton}" name="label" value="Register"/>
<mx:SetProperty target="{linkbutton1}" name="label" value="Login"/>
<mx:SetEventHandler target="{linkbutton1}" name="click" handler="this.currentState=''"/>
</mx:State>
</mx:states>
<mx:Panel id="myPanel" title="Please Log In"
paddingLeft="10" paddingRight="10"
paddingTop="10" paddingBottom="10">
<mx:HBox width="100%">
<mx:Label text="User Name:" width="75"/>
<mx:TextInput id="userName"/>
</mx:HBox>
<mx:HBox width="100%">
<mx:Label text="Password:" width="75"/>
<mx:TextInput id="password"/>
</mx:HBox>
<mx:ControlBar id="controlbar1">
<mx:Button label="Login" id="submitButton"/>
<mx:Spacer width="100%"/>
<mx:LinkButton label="New User?" click="this.currentState='registerForm'" id="linkbutton1"/>
</mx:ControlBar>
</mx:Panel>
</mx:Application>