Display all methods from Button : describeType « Development « Flex






Display all methods from Button

Display all methods from Button
        

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="getDetails()">
    <mx:Script>
        import flash.utils.*;
        public function getDetails():void {
            var classInfo:XML = describeType(button1);
            ta2.text = classInfo.toString();
            ta1.text = "Class " + classInfo.@name.toString() + "\n";

            for each (var m:XML in classInfo..method) {
                ta1.text += "Method " + m.@name + "():" + m.@returnType + "\n";
            }
        }
      </mx:Script>
    <mx:Button label="Submit" id="button1" />
    <mx:TextArea id="ta1" width="400" height="200" />
    <mx:TextArea id="ta2" width="400" height="200" />
</mx:Application>

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.Access accessor for a Button with IntrospectionAccess accessor for a Button with Introspection
2.Use describeType method to show information for a typeUse describeType method to show information for a type