I have an MXML component that includes a .as file with
<fx:Script source="myfile.as" />
Running asdoc throws a whole bunch of errors like
"Error: The private attribute may be used only on class property definitions."
"Error: The public attribute can only be used inside a package."
The only useful information I could find on the subject was in this article: http://danielmclaren.net/2009/08/28/using-asdoc-with-mxml-files-and-included-scripts.
The problem is described there with two possible solutions:
- Solution 1 is to move the AS code into the MXML file. Kind of defeats the objective of using external .as files for MXML components in the first place, so really a last resort option. Code inside a mxml file is messy (I really don't want logic mixed in with mxml), and would also require using the < !--- ---> asdoc syntax.
- Solution 2 is to have the MXML component inherit from a normal class file. That would mean no private members in the base class, only internal (meaning a separate package for the component to be safe) or protected. This would make things tedious to say the least.
Are there any other work-arounds or possibly a beta/nightly version of asdoc that fixes the problem? I am using the Flex 4.1.0.16076 SDK, the "latest production quality release".
Update
Just tried using asdoc from the svn trunk, (4.5.0 rev. 16942) and the problem persists.