Adobe FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manual page 177

Migrating applications to flex 2
Table of Contents

Advertisement

// List accessors as properties:
for each (var a:XML in classInfo..accessor) {
ta1.text += "Property " + a.@name + "=" + button1[a.@name] + " (" +
a.@type +")\n";
}
// List the object's methods:
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>
The output displays accessors, variables, and methods of the Button control, and appears
similar to the following:
Class mx.controls::Button
...
Variable id=button1 (String)
Variable __width=66 (Number)
Variable layoutWidth=66 (Number)
Variable __height=22 (Number)
Variable layoutHeight=22 (Number)
...
Property label=Submit (String)
Property enabled=true (Boolean)
Property numChildren=2 (uint)
Property enabled=true (Boolean)
Property visible=true (Boolean)
Property toolTip=null (String)
...
Method dispatchEvent():Boolean
Method hasEventListener():Boolean
Method layoutContents():void
Method getInheritingStyle():Object
Method getNonInheritingStyle():Object
Variable enumeration and object introspection
177

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex 2

Table of Contents