|
Actually it was an error of using target when I should have been using relativeTo. I was working off of some outdated documentation examples.
--------------
-- 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
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/::commitCurren tState()
at mx.core::UIComponent/setCurrentStat e()
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 ---

