My team is building an enterprise web application with a Flex UI that generates its screens at runtime based on XML files. It determines how to form its data service requests, what components to use, how to configure the components (line styles, custom data grid columns, etc.) all based on the XML, using a schema that we developed in-house. It’s a lot of fun.
The ability to quickly and easily introspect classes comes in very handy with this sort of development, since we don’t want to write or maintain a separate method for every class defined by our XML schema to instantiate itself. The native Flash.utils.describeType() is very useful here, as it gives a pretty complete description of the class in an easily traversed XML format. However, I learned that it can also be misleading.
I had created a single routine to initialize a wide range of classes from XML, and it worked perfectly - as long as it was running in debug mode. It took a while, but I found the cause of the propblem: describeType() gives more information when the SWF is compiled as a debug SWF than when it is compiled as a release SWF.
It’s not too surprising that such metadata as “__go_to_definition_help” is only available for a debug-version SWF. However, I did not expect to see something as useful as ArrayElementType omitted from the release SWF.
A couple of workable solutions have been posted here.