Using ObjectUtil to dump an object's properties : ObjectUtil « Development « Flex






Using ObjectUtil to dump an object's properties

        
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    creationComplete="trace(ObjectUtil.toString(myAC))">
    <mx:Script>
        
        import mx.collections.ArrayCollection;
        import mx.utils.ObjectUtil;
        public var myAC:ArrayCollection = new ArrayCollection([
            {label:"J", data:"j"},
            {label:"T", data:"t"},
            {label:"F", data:"f"}
        ]);
      
    </mx:Script>
</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.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
3.ObjectUtil.getClassInfo() returns an Object with the name and properties of the target objectObjectUtil.getClassInfo() returns an Object with the name and properties of the target object
4.use mx.utils.ObjectUtil.toString()use mx.utils.ObjectUtil.toString()