1 Reply Latest reply on Oct 5, 2009 12:49 PM by UbuntuPenguin

    I can see the component , but it is "NULL"

    UbuntuPenguin Level 4

      Hello Everyone ,

        I have a piece of code , that works with an accordion.  I can see the accordion , but when it runs the refreshUser code , the accordion is listed as null. Of course this all takes place after the "creationComplete" stage because I can see and manipulate the containers in the accordion , but flex thinks it's not there.

       

                  public function refreshUser():void
                  {
                      var index:int = accordion.selectedIndex;
                      var userAccBox:UserAccBox = accordion.getChildAt(index) as UserAccBox;
                      userAccBox.fileService.send();
                  }

                 ....

                 <mx:VBox id="vbox" width="100%" height="100%">
                    <mx:Accordion id="accordion" change="{accordionChange(event)}" width="100%" height="100%">
                        <mx:Repeater id="repeat" dataProvider="{userModelCollection}">

                               <views:UserAccBox creationComplete="init()"
                                           loginPassword="{loginPassword}"
                                           loginUsername="{loginUsername}"
                                           uModel="{repeat.currentItem}"
                                           width="100%" height="100%"/>
                        </mx:Repeater>
                    </mx:Accordion>
                </mx:VBox>