Archive for November, 2010

Flash Builder 4 – ASDoc hints in the IDE, commenting for yourself!

November 24, 2010

A really nice feature in Flash Builder 4 is the displaying of ASDoc hints by default on hover over delay. Now it makes sense to comment the code with ASDoc tags, not just for API dev, but also because the hints will pop up for other developers on your team and yourself.

ASDoc FB4 IDE Hinting

This gives an added incentive for developers to comment their code with function/variable/class descriptions along with relevant @param, author, returns tags.

If you still want to generate and publish the actual ASDoc html files from within the FB4 IDE, heres a very good tutorial from Arjan on Flex-blog.com to get you sorted. I made one change to Arjan’s setting up the ASDoc.exe tool to run as an External tool rather than a command prompt. I set the ‘Working Directory’ to ${folder_prompt}, so that each time you run it, you get to choose which project folder you want to target (usually in you Flash/Flex Builder Workspace somewhere). Also, as we may need to target different versions of the Flex SDK, I’ve named the External Tool Configuration ASDoc SDK 3.4, to mimic the location of the ASDoc.exe.

External Tools Configuration - ASDoc Generation from within Flash Builder 4

Advertisements

API (SWC) “Code Navigation Error” when Ctrl+Left Click in Flex Builder

November 22, 2010

You’ve added your SWC to the build path, and it works fine. But, when you want to view a source file (ctrl+left click on the function name for example), you get an error. This use to bug me.

You need to edit the Source Attachment directory location in the Build Path (right click on the project name, and click properties/build path). Click the edit button for the Source Attachment, and point to the ‘src ‘ folder of the api zip file you downloaded. It may be the case that your import statement looks like “import com.mc.components.MyComponent;” but the file structure is src/main/flex/com/mc/.. : in this case set the source attachment folder to point to ..src/main/flex, i.e. the last folder before the imported package.

Flex Builder - src build path

Problem Finding and Downloading Flex Builder 3 and Flex 3 SDK’s

November 17, 2010

It has gotten difficult to find the download for Flex Builder 3 now that Adobe is pushing Flash Builder 4.

You can find the Flex Builder 3 download link on the M&S Consulting  blog.

You can also use Flash Builder 4 to work on Flex 3 projects, by pointing the compiler to a relevant sdk download, good tutorial and screencast on the Adobe Site by Andrew Shorten.

A list of Flex 3 SDK versions are available to download here. The FB3_Updater.exe (used for updating for flash 10 i think) is available here.