View unanswered posts | View active topics



Reply to topic  [ 1 post ] 
ASDoc fix for missing fl. mx. packages error (SWC library) 
Author Message
Member

Joined: Fri Feb 15, 2008 1:31 am
Posts: 11
Location: Dallas, Texas
Reply with quote
If any of your FlashDevelop 4 projects that have an FLA file with fl. mx. packages exported (i.e. you're using built in components that reference imports from fl.data or fl.controls, etc.) then you've likely run into the nagging and persistent hassle of errors with your ASDoc documentation.

I have found a fix after some research online and some tips here, but I did this only for Flash Pro CS5.5 based on the CS3 approach.

Here's the background on what I did to finally get this working using the built-in ASDoc tool with FlashDevelop 4.
  1. In a new AS3 FLA, I created a new movie clip with the library name "fl-shim" (no quotes).
  2. Edited that movie clip and added every single component from the components panel (yes, even the FLV stuff and redundant component pieces, parts, buttons, etc.)
  3. Exited out of edit mode for the movie clip (back to the main stage)
  4. Right-clicked (I'm on Windows here) on the fl-shim movie clip in the library and selected "Export SWC File..."
  5. Browsed to my FlashDevelop install location and went to this path: FlashDevelop\Library\AS3\frameworks\FlashIDE\
  6. Saved the file there named "fl-shim.swc" (no quotes) to have the path be: FlashDevelop\Library\AS3\frameworks\FlashIDE\fl-shim.swc
  7. Now the fun part, configuring the ASDoc tool in FlashDevelop 4
  8. Under the project tab, configure the title and output directory.
  9. Add any 'exclude classes' (I liked to leave this blank here and add it later as additional "Extra options:")
  10. Include any applicable "Classpaths:"
  11. Set compiler to "ASDOC (AS3)" in the "Compiler:" drop down.
  12. Under "Extra options:" enter a few extra ASDoc flags/values to get everything to compile, particularly with telling ASDoc where the fl-shim.swc library/path is located so the Flex 4.5+ SDK won't freak out and generate errors.
    • Code:
      -lenient
      (helps ASDoc avoid javadoc comment tags/errors for unrelated/unsupported tags)
    • Code:
      -exclude-dependencies=true
      (only use this if you have NO "Classpaths:" configured!)
    • Code:
      -source-path "C:\Path\Folder"
      (this may or may not be needed, depending on Classpaths and source locations)
    • Code:
      -library-path "C:PathToFlashDevelop\FlashDevelop\Library\AS3\frameworks\FlashIDE\fl-shim.swc"
      (obviously, replace your C:PathToFlashDevelop with the proper path on your computer/system setup)
    • Code:
      -window-title "Your title for the documentation window"
    • Code:
      -footer "Your footer stuff, like copyright, website, date of generation, whatever"
    • Code:
      -doc-classes com.name.package1 com.name.package2
      (separate each additional include package with a space. This flag is for additional class packages to include, which may cause problems if you're using "Classpaths:" with similar shared locations)
  13. Settings tab: make sure the ASDoc location is set to the FlashDevelop\Tools\flexsdk\bin folder and probably tick the checkbox "Copy compiler related template files..."
  14. Generate the documentation and you'll likely not find any errors if you've properly configured your Classpaths and Extra Options appropriately

fl-shim.swc file for Flash Pro CS5.5 (may work in other CS5/CS4 versions, not sure)
http://rhaws.com/fl-shim.swc

Screenshot of new fl-shim.swc in proper FlashDevelop Library folder
Image

Screenshot of ASDoc Tool Project Tab Sample Setup
This example shows that I'm NOT including my base frameworks (greensock, alivepdf, puremvc, etc.) in the Classpaths, because in this situation, I'm ONLY wanting to document the project's specific additional classes not part of the base frameworks. You could of course include all of them inclusively, but most clients don't want the entire framework documentation, which is usually kept separate most of the time.
Image

Screenshot of ASDoc Tool Settings Tab Sample Setup
Image

Screenshot of the full documentation method for Classpaths and custom SWC libraries
Now for a more full-framework + additional classes for the project documentation endeavor, here's how I do it on my side. Notice that there are a few tweaks and quirks to look out for when mixing and matching Classpaths and additional classes, which include the fl. packages and reference the fl-shim.swc library. Primarily, if using the V11 Greensock Tweening Platform, you'll have to add library paths to the certain core Flex SWC file(s) based on your particular usage. Also, alivePDF requires some Flex SWC file(s) as well.
Image

Screenshot of showing ASDoc producing javadoc comments/tag errors, but continuing with generation
Because we set the "-lenient" flag, ASDoc will output the javadoc tags/comment errors, but continue so long as the validating parser doesn't fail or error out. This also helps you to see where the issues are, and they most always are within the Greensock, pureMVC, alivePDF and Adobe packages. What a headache, but with a little time, you can go back and fix all of those nasty unclosed tags and invalid structured javadoc comments.
Image

I do hope this mini tutorial/example helps other developers in their ASDoc generation hassles when using the fl. packages and/or Flex packages.

Peace.


Sat Mar 03, 2012 7:12 pm
Profile YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.