Hey to all
Flex Builder Version : 3
I'm developing an webapp and I've created two states (View States):
1. Login
2. Base (with a 5 element TabBar and a ViewStack controlled with this
TabBar). Inside the ViewStack there are Canvasses with some
propietary components.
Context:
a. The base app, with just the base State, without the 'login'
ViewState works perfect.
b. The View States were created visually, in order to lessen the
mistaken code stakes.
c. When I add the 'login' ViewState and run the program, the debugger
tells me:
"Error: Multiple sets of visual children have been specified for this
component (base component definition and derived component
definition)."
Nonetheless, if I set the 'start' state to the Base ViewState (not the
'login') and add a link to go back to the login ViewState, there's no
problem (unless I click the 'login' button to get me to the base State
again).
The code containing the ViewStates change is the following:
<mx:Script>
<![CDATA[
...
private function OKlogBtn_click(evt:Event):void
{
currentState='';
}
]]>
</mx:Script>
<mx:states>
<mx:State name="loginState">
<mx:RemoveChild target="{btnBar1}"/>
<mx:RemoveChild target="{cpHome}"/>
<mx:RemoveChild target="{cpProfile}"/>
<mx:RemoveChild target="{viewstack1}"/>
<mx:RemoveChild target="{hbox1}"/>
<!-- <mx:RemoveChild target="{meemoLogoImg}"/>
-->
<mx:AddChild relativeTo="{canvas1}"
position="lastChild"
>
<mx:VBox height="100%" width="100%"
horizontalAlign="center"
verticalAlign="middle">
<mx:Image
source="{meemoLogoClass}"
scaleX="3" scaleY="3"
alpha="0.7">
<mx:filters>
<mx:DropShadowFilter
distance="0"
blurX="10" blurY="10"
angle="0"
color="#FFFFFF"
/>
</mx:filters>
</mx:Image>
<mx:Spacer height="50"/>
<mx:HRule
alpha="0.5"/>
<mx:Spacer height="50"/>
<mx:Form id="loginForm"
width="350"
height="200"
>
<mx:FormItem
width="100%" horizontalAlign="left">
<mx:Canvas
id="loginIDBox">
<mx:Label text="ID"
width="90"
y="0" x="0"
styleName="loginLabel"/>
<mx:TextInput id="loginIDInput"
styleName="loginTextInput"
y="0" x="95"
width="150"
/
>
</mx:Canvas>
</mx:FormItem>
<mx:FormItem
width="100%">
<mx:Canvas
id="loginPWDBox">
<mx:Label text="password"
width="90"
y="0" x="0"
styleName="loginLabel">
</
mx:Label>
<mx:TextInput id="loginPWDInput"
styleName="loginTextInput"
displayAsPassword="true"
y="0" x="95"
width="150"
fontWeight="bold"
/
>
</mx:Canvas>
</mx:FormItem>
<mx:FormItem
width="100%">
<mx:Canvas>
<mx:CheckBox id="keepMeLoggedCB"
label="Keep me logged in"
textAlign="right"
x="95"
/
>
<mx:Spacer height="10" />
</mx:Canvas>
</mx:FormItem>
<mx:FormItem
width="100%">
<mx:Canvas>
<mx:Button id="OKlogBtn"
width="60"
label="Go!"
x="95"
fontFamily="Arial"
click="OKlogBtn_click(event)"/>
</mx:Canvas>
</mx:FormItem>
</mx:Form>
</mx:VBox>
</mx:AddChild>
</mx:State>
</mx:states>
....
Anybody knows what happens???
Thx!
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.