0 Replies Latest reply on Jul 20, 2010 7:10 AM by djh88ukwb

    ArgumentError: Error #2025 When using Viewstack showing components

    djh88ukwb Level 1

      Hello all.

       

      I have the following viewstack.

              <mx:ViewStack includeIn="clientuser" x="220" y="150" id="viewstack1" width="794" height="430">
                 
                  <s:NavigatorContent id="home" label="View 1" width="100%" height="100%">
                      <s:BorderContainer  id="home_canvas" width="794" height="430" showEffect="{fadeIn}" styleName="largecont">
                          <s:Label x="212" y="77" text="Home Container" styleName="menuLabel" fontSize="36"/>
                      </s:BorderContainer>
                  </s:NavigatorContent>
                 
                  <s:NavigatorContent id="mancan" label="View 1" width="100%" height="100%">
                      <ns1:comp1 id="comp1_comp" showEffect="{fadeIn}" LoadedID="{LoadedID}">

                      </ns1:comp1>
                  </s:NavigatorContent>
                 
                  <s:NavigatorContent id="manjob" label="View 1" width="100%" height="100%">
                      <ns1:comp2 id="comp2_comp" showEffect="{fadeIn}" Taken="{LoadedID}">
                      </ns1:comp2>
                  </s:NavigatorContent>
                 
                  <s:NavigatorContent id="interview" label="View 1" width="100%" height="100%">
                      <!--<local:AVChat id="AvChat_comp" ClientUserID="{LoadedID}"  showEffect="{fadeIn}">
                      </local:AVChat>-->
                  </s:NavigatorContent>
                 
                  <s:NavigatorContent id="edit" label="View 1" width="100%" height="100%">
                      <ns1:comp3 id="comp3_comp"  showEffect="{fadeIn}" LoadedID="{LoadedID}">
                      </ns1:comp3>
                  </s:NavigatorContent>
                 
                  <s:NavigatorContent id="help" label="View 1" width="100%" height="100%">
                      <s:BorderContainer  id="help_canvas"  width="794" height="430"  showEffect="{fadeIn}" styleName="largecont">
                          <s:Label x="212" y="77" text="Help and Support" styleName="menuLabel" fontSize="36"/>
                      </s:BorderContainer>
                  </s:NavigatorContent>
              </mx:ViewStack>

       

      I am then using buttons to switch between the views,  It all works fine, until i load the "local:AVChat" component. It loads ok, but then when i try to swap to a different one, i get the following error

       

      ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
      at flash.display::DisplayObjectContainer/getChildIndex()
      at mx.managers::SystemManager/getChildIndex()
      at mx.managers.systemClasses::ActiveWindowManager/mouseDownHandler()

       

      When looking at the components, they all start with <s:Group/> apart from the one that throws the error when i try to swap from it, and this starts with

      <AVChatApp>

       

      The component is one that comes from a service provider, so i havent got much say about why it starts with <AVChatApp>.  Although it also comes with an as file, which has this line in it.

      public class AVChatApp  extends Application

       

      So it makes it difficult to replicate the program but put it in an s:Group.

       

      Can anyone offer me some advice on what i can do with this component, i need to get it working without errors,  I must say the errors only appear one a few computers.  But when the error does show, (by trying to swap from the component) i get the error on all other components when trying to swap from them.

       

      Ive been sat here for ages trying to solve it but no luck, any ideas?