Hi!
I've got a weird issue with embed image.
I'm currently learning how to handle state view. Here's what I don't
understand :

       <mx:State name="Basic">
            <mx:AddChild position="lastChild">
                <mx:HBox id="hbox0"/>
            </mx:AddChild>
        </mx:State>
       <mx:State name="Test1" basedOn="Basic">
            <mx:AddChild relativeTo="{hbox0}" position="lastChild">
                <mx:Button icon="{Assets.ICONE_MFRAC}"/> //The icon create
the problem. no warning or error here
            </mx:AddChild>
        </mx:State>
        <mx:State name="Test2" basedOn="Basic">
            <mx:AddChild relativeTo="{hbox0}" position="lastChild"> //this
line get a warning and when rendered the button appears to be on the parent
component
                    <mx:Button icon="{Assets.ICONE_MFRAC}"/>
     //Data
binding will not be able to detect assignments to "hbox0".  hmkay but why?
            </mx:AddChild>
        </mx:State>

but if I do this :

       <mx:State name="Basic">
            <mx:AddChild position="lastChild">
                <mx:HBox id="hbox0"/>
            </mx:AddChild>
        </mx:State>
       <mx:State name="Test1" basedOn="Basic">
                <mx:AddChild relativeTo="{hbox0}" position="lastChild">
                <mx:Button/> //No icon
            </mx:AddChild>
        </mx:State>
        <mx:State name="Test2" basedOn="Basic">
            <mx:AddChild relativeTo="{hbox0}" position="lastChild"> //work
fine! no error of warning anywere but whyyyy??????
                    <mx:Button icon="{Assets.ICONE_MFRAC}"/>
            </mx:AddChild>
        </mx:State>

If anyone could give me a hint on this issue it would be great.

-- 
Thanks,
Guillaume

Reply via email to