Actually it was an error of using target when I should have been using relativeTo. I was working off of some outdated documentation examples.

 

 

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

---------
| 1 |   |
---------  Binary Soduko
|   |   |
---------

"C code. C code run. Run code run. Please!"
- Cynthia Dunning

 

Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. __._,_.___

--
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




__,_._,___
--- Begin Message ---

This error means the component you are trying to add is already a child component of some container. In your example I’m sure VBox is already a child of application or any other component. You first need to remove that child from the existing parent and then add to a new parent.

 

If the VBox id is V1 and Panel’s id is P1 then you should write

 

<mx:RemoveChild target=”{V1}”/>

<mx:AddChild target=”{V1}” relativeTo=”{P1}”/>

 

 

-Ashish

 

 


From: [email protected] [mailto:[email protected]] On Behalf Of Ian Skinner
Sent: Thursday, June 29, 2006 3:43 PM
To: [email protected]; [EMAIL PROTECTED]; [email protected]
Subject: [flexcoders] MX:AddChild error

 

Error: Cannot add a child that is already parented.
at mx.states::AddChild/apply()
at mx.core::UIComponent/::applyState()
at mx.core::UIComponent/::commitCurrentState()
at mx.core::UIComponent/setCurrentState()
at mx.core::UIComponent/set currentState()
at MobileCalendar/__button1_click()

What does this mean? I am trying to add a VBox to a Panel in my application. When I click on the button to add this VBox, I get this error. But I do not understand what it is trying to tell me.

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

---------
| 1 | |
--------- Binary Soduko
| | |
---------

"C code. C code run. Run code run. Please!"
- Cynthia Dunning

Confidentiality Notice: This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message.


--- End Message ---

Reply via email to