Flex and Flash Developer - Jesse Warden dot Kizz-ohm

A blog on software development, technology, games & movies.

About

This is the blog of Jesse Warden, a Rich Internet Application Architect. He specializes in using Flex and Flash to create Rich Internet Applications.

Has anyone gotten ASDoc in Flex 2 to work on a Mac? I’m writing some API’s at work so have the dubious honor of writing documentation. However, the Ant tasks don’t support asdoc, nor do simple Ant exec tasks work. Something about some Java class not finding “Flex”.

I reckon I could generate the docs on my PC at home, but that’s a cop-out. Plan B might be to go give NaturalDocs another run. According to the site, my Mac already has a Perl runtime, so a decent option. While I’m not a fan of deviating from the Java docs format, the docs it outputs are important, not the format.



10 Responses to “ASDoc on Mac?”

  1. I haven’t done a huge amount of research but found it works if you run it directly from the bin directory.

    Note that for OSX/Unix asdoc is actually a shell script. Chances are it’s a classpath / jvm issue that could be sorted with a change to the script, but I haven’t tried that yet.

    Marcin

  2. .. some more investigation shows that this happens when you have spaces in the path to the Flex Builder 2 directory.

    I created a symlink from the FB2 directory into my home directory and it works fine:

    Wagyu:~ marcin$ ln -s ‘/Applications/Adobe Flex Builder 2 Plug-in/Flex SDK 2′ fb2
    Wagyu:~ marcin$ ~/fb2/bin/asdoc
    Loading configuration file [… etc]

    Marcin

  3. Jesse, have you found an answer for this yet? I would be interested in learning more about what you find…

    Chad

  4. …well, works wonders on Windows. Bleh, guess I’ll just use Windows to compile the docs till someone else figures it out.

    JesterXL

  5. Let’s see if this even comes through. The below works for me using Ant on the Mac. This assumes you have the latest Flex 2 SDK in the spot referenced below. Adjust the arguments to asdoc accordingly, and add this target to your main target’s depend list:

    <property name="flexSDK" value="/Developer/SDKs/Flex" />
    <property name="asdoc" value="${flexSDK}/bin/asdoc" />
    <target name="doc">
    <exec executable="${asdoc}">
    <arg line = "-source-path ${src.dir} -doc-classes ApplicationClass -window-title ‘Documentation’ -output ${dist.dir}/docs" />
    </exec>
    </target>

    enefekt

  6. Don’t know why I even thought that would work. I just put the example up in a text file here:
    http://enefekt.com/ant_asdoc_example.txt

    enefekt

  7. I just don’t know how to use Terminal commands. If I go ‘./asdoc’ instead of ‘asdoc’, it works great! Thanks to John Robinson.

    JesterXL

  8. Hi Jesse,

    I’ve been able to succesfully use adoc on the mac for a while now. Perhaps I can be of some help, how are you trying to use asdoc exactly?

    cheers,
    Sam

    Samuel Agesilas

  9. Hi Jesse,

    I’ve add a tutorial on tamin asdoc on os x. You can find it on my blog here…

    http://www.levelofindustry.com/journal/2007/5/2/taming-asdoc-in-flex-builder-on-os-x.html

    Hope it helps… peace,
    Sam

    Sauel Agesilas

  10. Thanks Sauel! If you see from the comments, I eventually figured it out; it apparently was just my Terminal format. I’m new to the Mac, as well as new to Terminal commands so I just emailed a friend of mine who uses Mac and we figured it out.

    JesterXL

Leave a Reply