describeType – an important note
In one of my previous posts (Acedia – apathy and laziness in the practice of virtue), i spoke about the extremely helpful function describeType.
While busy on a project this weekend, i ran into a little problem using describeType and thought i’d put a solution to it on my blog in case anybody runs into the same problem. The problem arose when i used describeType on a bindable class. When a class is made bindable using the [Bindable] syntax, the describeType will not return public variable names, it will return accessors and a whole bunch of other information.
In this situation, instead of typing: var variables:XMLList = describeType(myClass)..variable; try using this: describeType(myClass)..accessor; This will still do the same thing as in the previous example, but will return all the variables in a bindable class.
Hope it helps!
