ObjectUtil.getClassInfo() returns an Object with the name and properties of the target object : ObjectUtil « Development « Flex






ObjectUtil.getClassInfo() returns an Object with the name and properties of the target object

ObjectUtil.getClassInfo() returns an Object with the name and properties of the target object
        
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
    import mx.controls.Alert;
    import mx.utils.ObjectUtil;
    private function showProps(b:Button):void {
        var o:Object = ObjectUtil.getClassInfo(b);
        ta1.text = ObjectUtil.toString(o);
    }
  </mx:Script>
    <mx:Button id="b1" label="Show Properties" click="showProps(b1)" />
    <mx:TextArea id="ta1" width="300" height="500" />
</mx:Application>

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.Use getClassInfo() and toString() methods to show the properties of the Button controlUse getClassInfo() and toString() methods to show the properties of the Button control
2.Using ObjectUtil to dump an object's properties
3.Use mx.utils.ObjectUtil.toString() to print all dynamically added properties of an objectUse mx.utils.ObjectUtil.toString() to print all dynamically added properties of an object
4.use mx.utils.ObjectUtil.toString()use mx.utils.ObjectUtil.toString()