They must have been putting in some late nights at Adobe while working on the documentation for Flex… nevertheless, here is an excellent example of how [Not] to write (from Creating and Extending Flex 2 Components).
DefaultProperty metadata tag
The
[DefaultProperty]metadata tag defines the name of the default property of the component when you use the component in an MXML file.The
[DefaultProperty]metadata tag has the following syntax:[DefaultProperty("propertyName")]The propertyName property specifies the name of the default property.You can use the
[DefaultProperty]metadata tag in your ActionScript component to define a single default property. For more information, and an example, see “Creating a default property†on page 125.
[Yawn] If you’ve learned anything about what exactly default properties are from this excerpt can you please explain it to me?
Also, I’d just like to add that the Flex metadata tags, of which there are 11, represent a minor [WTF?] for me. These are used to [Manually] mark certain bits of code as things that the compiler should be aware of but would otherwise not be (for example, all events must be marked with an [Event] metadata tag for Flex to recognize them). It’s probably not as bad as it seems but I wish they had figured out a [BetterTechnique].
Would anyone care to comment on metadata tags?