2 Replies Latest reply on May 4, 2011 11:29 AM by Clay Borne

    Iterating through spark components

    bornecw

      I'm trying this:

      private function disableInputs(objToCheck:Object):void{
          var i:int;
          for (i=0; i < objToCheck.numChildren; i++) {
              var obj:Object = objToCheck.getChildAt(i);
              if(obj is BorderContainer || obj is TitleWindow){
                  disableInputs(obj);
              }else{
                  if (obj is TextInput){
                      obj.enabled = false;   
                  }
              }
          }
      }

       

      And... no joy... Does anyone have a better way to accomplish this?