Mega Code Archive

 
Categories / Flex / Development
 

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>