Flex 3 ASDocs issue

We are trying to compile ASDocs against the Flex 3 Library project. Our problem is ASDocs refuses to recognize any custom mxml component that is created and used in the library.

For example, if we have a custom mxml AdvancedButton control in our library and we try to use it in another mxml class in the library, the ASDocs compiler errors in the parent class file with "Error: Type not found" or was not a compile-time constant: AdvancedButton ".

An error also occurs if we try to extend our custom component. Therefore, if our library contains an AdvancedButton that extends Button and an ExtraAdvancedButton that extends AdvancedButton, ASDocs will be "Unable to find the specified base AdvancedButton class for the ExtraAdvancedButton component class."

On the other hand, if the AdvancedButton is referenced from an external library, we get no errors.

This doesn't seem to be a problem if the files are .as and not .mxml. In our case, however, we have nested components based on degrafa.

Ideas would be highly appreciated.

+1


a source to share


3 answers


I have had the same problem lately. The trick for me was to add the -source-path "src" to the asdoc compiler arguments.

Here is the asdoc command that worked for me:

c:\work\prg\Flex>"c:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.3.0\bin\asdoc.exe" -doc-sources "src" -main-title "PRG documentation" -output "c:\work\prg\Flex\docs" -source-path "c:\work\XmlMappingAS3\src" -source-path "assets\css" -source-path "c:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.3.0\frameworks\projects\framework\src" -source-path "c:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.3.0\frameworks\projects\rpc\src" -external-library-path "c:\work\commonLibraries\Flex\as3commons-reflect-1.0.0.swc" -external-library-path "c:\work\commonLibraries\Flex\Cairngorm.swc" -external-library-path "c:\work\commonLibraries\Flex\spring-actionscript.swc" -external-library-path "c:\work\commonLibraries\Flex\xpath-as3-1.0.0.swc" -external-library-path "c:\work\commonLibraries\Flex\as3corelib.swc" -external-library-path "c:\work\commonLibraries\Flex\as3reflect.swc" -source-path "src"

      



Also, a lot of help would be using the ActionScript Documentation Generator for FlashDevelop (which is, in fact, the one I used). If you install FlashDevelop on Windows in "c: \ Program Files \ FlashDevelop", the documentation generator is located in the "c: \ Program Files \ FlashDevelop \ Tools \ asdocgen \ ASDocGen.exe" folder.

Good luck!

+2


a source


I spent a couple of hours building ASDocs for my Flex project and kept getting errors related to not being able to find the base class x / y / z. I eventually discovered that it was because I did not tell ASDoc about the location of the Flex SWC files:

(For me) C:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.4.0\frameworks\libs

      



Include this path in an optional argument -library-path

and you should find that it stops any errors related to missing base classes.

This is similar to the original issue described above, missing references to where these custom components sit. Make sure the base directory is included that contains these custom .as files.

+2


a source


Are you using the asdoc library path parameter?
But wait, and said he didn't get any errors if he referenced an external library - so using the library path already, right?

Flex 3 ASDoc does not document mxml at all. So maybe u shud get flex 4 sdk and try with the asdoc that comes with it.

0


a source







All Articles