Use mx.utils.ObjectUtil.toString() to print all dynamically added properties of an object : ObjectUtil « Development « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Development » ObjectUtilScreenshots 
Use mx.utils.ObjectUtil.toString() to print all dynamically added properties of an object
Use mx.utils.ObjectUtil.toString() to print all dynamically added properties of an object
        

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    creationComplete="initApp()">
    <mx:Script>
    import mx.utils.ObjectUtil;
    private var obj:Object = new Object();
    private function initApp():void {
        obj.a = "A";
        obj.b = "B";
        obj.c = "C";
    }
    public function dumpObj():void {
        ta1.text = ObjectUtil.toString(obj);
    }
  </mx:Script>
    <mx:TextArea id="ta1" width="400" height="500" />
    <mx:Button label="Dump Object" click="dumpObj()" />
</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.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()
w___w_w__.__j_ava___2s___.___c__o___m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.