is there a problem in the following code
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >
<!-- The Application class states property defines the view
states. -->
<mx:states>
<!-- Flex enters the newButton state when you click button b1 -->
<mx:State name="newButton">
<!-- Add a Button child control to the v1 VBox control. -->
<mx:AddChild target="{v1}">
<mx:Button label="New Button" />
</mx:AddChild>
<!-- Disable the "Add a Button" button to prevent adding
more than
one button. -->
<mx:SetProperty target="{b1}" name="enabled" value="false" />
</mx:State>
</mx:states>
<!-- The application's child controls define the base state. -->
<mx:VBox id="v1">
<mx:Button id="b1" label="Add a Button"
click="currentState='newButton'"/>
<!-- clicking the following button returns Flex to the bas
state. -->
<mx:Button label="Remove Added Button" click="currentState=''"/>
</mx:VBox>
</mx:Application>
i seem to get a error each time saying:
Error: Cannot add a child that is already parented.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

