When I setCurrentState to one of the other states, I get a null object
error thrown from the removeChild method. I'm also getting binding
errors from using the {} syntax for the id that I'm going to remove.
This is really strange because when I just run the application out of
Flex Builder it works fine. However, for some realy strange reason, it
throws an error when I run it out of Eclipse. Has anyone heard of this
before?

Here's the code.

<mx:states>
                <mx:State name="base">
                        <mx:AddChild target="{holder}" relativeTo="{this}" 
position="below">
                                <mx:HBox 
xmlns:mx="http://www.adobe.com/2006/mxml"; width="100%"
height="100%" paddingRight="4" id="holder"
                                paddingLeft="20" click="borrowerSelected();">
                                        <mx:Image id="addIcon"
source="{SessionLocator.getSession().assets.AddIcon}"
click="changeState()"/>
                                        <mx:Label id="itemEditor" 
text="{this.baseText}"/>
                                </mx:HBox>
                        </mx:AddChild>
                </mx:State>
                <mx:State name="appEditState">
                        <mx:RemoveChild target="{holder}"/>
                        <mx:AddChild>
                                <mx:target>
                                        <mx:VBox id="appEdit">
                                                <mx:HBox>
                                                        <mx:TextInput 
id="firstTextInput" text="{this.firstEditorText}"/>
                                                        <mx:TextInput 
id="secondTextInput"
text="{this.secondEditorText}"/>        
                                                </mx:HBox>
                                                <mx:HBox>
                                                        <mx:Button id="addApp" 
click="addItem()" label="Add Application"/>
                                                        <mx:Button 
id="cancelApp" click="cancel()" label="cancel"/>
                                                </mx:HBox>
                                        </mx:VBox>
                                </mx:target>
                        </mx:AddChild>
                </mx:State>
                <mx:State name="scenarioEditState">
                        <mx:RemoveChild target="{holder}"/>
                        <mx:AddChild>
                                <mx:target>
                                        <mx:VBox id="scenarioEdit">
                                                <mx:HBox>
                                                        <mx:TextInput 
id="scenarioTextInput"
text="{this.firstEditorText}"/>
                                                </mx:HBox>
                                                <mx:HBox>
                                                        <mx:Button 
id="addScenario" click="addItem()" label="Add
Scenario"/>
                                                        <mx:Button 
id="cancelScenario" click="cancel()" label="cancel"/>
                                                </mx:HBox>
                                        </mx:VBox>
                                </mx:target>
                        </mx:AddChild>
                </mx:State>
        </mx:states>
</mx:VBox>




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to