AS Docs

I am trying to figure out how to get AS Docs on my mac to work. I just spend the last four hours trying to get this working. I finally got it, and it seems like you need a “SRC” folder like what gets created when you have a flex project, but this is really for flash. I was able to figure this out from the command error, I guess I am learning after-all`-`

I am trying to document some actionscript 3.0 code, like that is seen in the adobe documentation.
Using terminal change location to the bin directory of the flex skd. The asDoc tool only seems to work from this location.

cd /Applications/Adobe Flex Builder 3/sdks/3.2.0/bin/

 

./asdoc -doc-sources=/Users/johnbarrett/Documents/Flex Builder 3/HelloWorld/
-source-path=/Users/johnbarrett/Documents/Flex Builder 3/HelloWorld/

The first line tells the complier where your application is, and the second line tells where you want the compiler to output your docs.

After running the application I get this nasty error

Loading configuration file /Applications/Adobe Flex Builder 3/sdks/3.2.0/frameworks/flex-config.xml
/Users/johnbarrett/Documents/Flex Builder 3/HelloWorld/src/Greeter.as: Error: A file found in a source-path must have the same package structure 'src', as the definition's package, ''.

/Users/johnbarrett/Documents/Flex Builder 3/HelloWorld/src/HelloWorld.mxml: Error: Can not resolve a multiname reference unambiguously. Greeter (from /Users/johnbarrett/Documents/Flex Builder 3/HelloWorld/src/Greeter.as) and src:Greeter (from /Users/johnbarrett/Documents/Flex Builder 3/HelloWorld/src/Greeter.as) are available.

/Users/johnbarrett/Documents/Flex Builder 3/HelloWorld/src/HelloWorld.mxml: Error: Can not resolve a multiname reference unambiguously. Greeter (from /Users/johnbarrett/Documents/Flex Builder 3/HelloWorld/src/Greeter.as) and src:Greeter (from /Users/johnbarrett/Documents/Flex Builder 3/HelloWorld/src/Greeter.as) are available.

/Users/johnbarrett/Documents/Flex Builder 3/HelloWorld/src/Greeter.as: Error: A file found in a source-path must have the same package structure 'src', as the definition's package, ''.

/Users/johnbarrett/Documents/Flex Builder 3/HelloWorld/src/HelloWorld.mxml(12):  Error: Type was not found or was not a compile-time constant: Greeter.

private var myGreeter:Greeter = new Greeter();

/Users/johnbarrett/Documents/Flex Builder 3/HelloWorld/src/HelloWorld.mxml(12):  Error: Call to a possibly undefined method Greeter.

private var myGreeter:Greeter = new Greeter();

Now lets run this using the src folder structure that the AS Docs Tool wants

./asdoc -doc-sources=/Users/johnbarrett/Documents/Flex Builder 3/HelloWorld/src
-source-path=/Users/johnbarrett/Documents/Flex Builder 3/HelloWorld/src

Finally here is a link to my first AS Docs. Of course there are lots of problems with it, as I have to include certain code blocks in the actionsctipt file, but I am stoked that I finally got this working!

Leave a Reply

Your email address will not be published. Required fields are marked *