2 Replies Latest reply on Dec 11, 2007 12:02 PM by m_hartnett

    TabNetvigator's Canvas get component problem

    Flex-Issac Level 1
      Hi all,
      When I want to get all component in the tab control, I can get first and last canvas components. But the middle index canvas components cannot be retreived. The canvas.getChildren() return 0 size array, how can I solve it?

      My code :
      private function putTabData(key:AxKey, data:AxData,tab:TabNavigator):void
      {
      var objArray:Array = new Array();
      var canvases:Array = tab.getChildren();
      var i:int = 0;
      var j:int = 0;
      var txtBox:TextInput = null;
      var nameID:int = key.NameID;
      var uid:int = 0;
      for(i=0;i<tab.numChildren;i++)
      {
      tab.selectedIndex = i;
      var canvas:Canvas = canvases as Canvas;
      objArray = canvas.getChildren();
      for(j=0;j<objArray.length;j++)
      {
      if (objArray[j] as TextInput)
      {
      txtBox = objArray[j] as TextInput;
      }
      }
      }
      }

      Thanks...