Sunday, May 27, 2007

metadata.Deprecated

Deprecated appears to function the same way as Exclude/ExcludeClass. Adding the Deprecated tag to a class, method, or property removes the item from the asdocs. It also removes the item from the Content Assist of FlexBuilder although it can still be used if manually typed. I expected the compiler to throw a warning telling me that I was using a deprecated function, but I could not get this to occur.

Based on what I've found, I'd expect the tag to be used in one of the following ways:

[Deprecated] // no additional data
[Deprecated("This use is Deprecated")] // a message to display with the warning
[Deprecated(replacement="Use function x instead")] // identification of item that replaced deprecated item

1 comment:

Anonymous said...

Hi Daniel,

I've added the [Deprecated] tag to some of my code, but unfortunately I do still see it in code completion. Do I need to do something else in addition to adding the tag to my code...i.e. does FlexBuilder just pick it up or do I need to add something to a config file somewhere to tell it to look for [Deprecated] tags.

Any help is much appreciated.

Take Care,
Cory

"Flex", "ActionScript" and possibly "MXML" are probably trademarks of Adobe Systems Incorporated.
"Adobe" is a trademark of Adobe Systems Incorporated.
This site is in no way endorsed or sponsored by Adobe Systems Incorporated.
Content Copyright © 2007 Daniel Freiman.
Site Design Copyright by its copyright holder.
The Flex Non-Docs reserves the right to remove comments for any reason.
All ActionScript and MXML code (and ONLY ActionScript and MXML code) on this website is available under the MIT License.