2 Replies Latest reply on Jul 5, 2006 7:27 AM by Newsgroup_User

    MX:AddChild error

    Level 7
      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
        • 1. Re: MX:AddChild error
          Level 7
          Ok the lesson here is that some of the beta documentation maybe out of
          date and show examples of AddChild with target, when it should now be
          relativeTo.

          Ian Skinner wrote:
          > 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
          • 2. Re: MX:AddChild error
            Level 7
            You can access the doc for the final released version of Flex at:

            http://livedocs.macromedia.com/flex/2/

            Stephen
            Flex Doc Team


            "Ian Skinner" <ian.skinner@bloodsource.org> wrote in message
            news:e81m49$qr5$1@forums.macromedia.com...
            > Ok the lesson here is that some of the beta documentation maybe out of
            > date and show examples of AddChild with target, when it should now be
            > relativeTo.
            >
            > Ian Skinner wrote:
            >> 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