Why won't ASDocs inherit properties from the Flex Framework?
ASDocs is confusing to say the least. I spent some time using some of the documented methods for setting up Flex Builder to generate ASDocs and decided I needed to learn more about the process and how it works before I started to try to automate it. I went to writing and running a batch file from the command line.
ASDocs, for those that don't know is a tool used to generate documentation of Flex classes / components. All the Flex Framework reference documents are generated using ASDocs. You use special comments and commands to make things work. As part of the DotComIt line of easy to use interface components I was creating a class that extends a List. Unfortunately, my generated ASDocs were not inheriting public and protected properties from the list class. I was unsure why. Basically I was doing this:
asdoc -source-path "C:\mysrc" -doc-classes com.flextras.dataSorter.DataSorter
On my machine, the asdoc executable is located at "C:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.0.0\bin\". I'd expect it to be located in a similar directory for your. My classes are located in the "c:\mysrc" directory. The Flex Builder Library Project source folder is pointed at that directory. My DataSorter class is located in "C:\mysrc\com\flextras\dataSorter\DataSorter".
It took me a while to get this far, because most of the command switches for asdocs are poorly documented. But, I found that this would generate my ASDocs for my component; but it would not include any List specific data which it should have been inheriting.
After some searching and some experimentation I found the solution. asdocs can support multiple sources directories separated by a space. So, if I added a second source directory that pointed to the Flex Framework source; asdocs would properly generate all the docs I needed. I changed my bat file to this:
asdoc -source-path "C:\mysrc" "C:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.0.0\frameworks\projects\framework\src"
-doc-classes com.flextras.dataSorter.DataSorter
I haven't decided if this is a good idea. ASDoc rolls right up the chain. So, now instead of just documenting my component, I am also pulling in docs for the List Class. And the ListBase class. And the UIComponent class. And all the interfaces and classes associated w/ said classes. It feels like I'm recreating some of the Adobe documentation.
Would distributing of my docs violate Adobe's copyright in this manner? Probably! Would they enforce it? Good question; I'm not sure.
By, the way, for those in the northeast, be sure to check out Flex Camp in Boston. I was there last year and had a grea ttime. I'll be there again this year, doing some interviews for The Flex Show. Registration is cheap compared to bigger conferences and the agenda is a bit more advanced than most Flex Camps. It's a great time to get you feet wet or to raise your skills.





Stephen
Good to know; thanks for the clarification. I do get a lot of errors when I run the code because the example files are not located in the source folder for my installation. Do you know where I can get those files?
When you build ASDoc using the Gumbo version, use the -examples-path option to point to that directory.
If you are building ASDoc from source code in multiple directories under the frameworks/projects directory, you can copy all of the asdoc dirs to one place, and then point -examples-path there.
Stephen