Categories
Articles

Flex Builder 2.01 an Internal Build Error has Occurred Please Check the Error Log

I am using Flex Builder 2.01.

I was attempting to follow the updated ModuleLoader documentation at Adobe blogs.

The directions included:To edit the list of runnable application files:
1. Right-click the project file and select properties.
2. Select the Flex Applications option.
The list of Flex applications appears in the dialog box. This list includes all MXML files
that were added as applications, regardless of their root tags.
You can add and remove modules from this dialog box by using the Add and Remove
buttons.

Well that dialog screen does not reflect your choices later, but also created in the problems tab the message

“An internal build error has occurred. Please check the Error Log.”

This is a catch all error when Flex Builder coughs up blood. Now I can see if you are messing with files outside of an integrated product you should be prepared to see the product cough. But I noticed in searching for this error message on the web, many folks have hit it in various ways while working inside of Flex Builder.

In my case I wanted to have a source folder called modules. The error was that I also needed to create manually a bin folder named modules. When you follow the directions above to set the modules as runnable, this does not occur automatically.

Well no matter what the reason for the error message you can find out more in a file in your workspace. This file is in the folder .metadata and is named .log. Once you open it you will see dumps of Flex corpuscles, a trace of its errors, and you can perhaps dig out the problem.

In my case it was simply

java.io.FileNotFoundException: C:\Documents and Settings\Lon\My Documents\Flex Builder 2\ModuleLoader\bin\modules\BarChartModule-debug.swf (The system cannot find the path specified)

Flex had been building these in the bin folder and only after I forced it to run them. Once I got the bin/modules folder created, it started doing this on its own.

Categories
Articles

Actionscript 3 Language Features

Actionscript 2 (AS 2) is great! Actionscript 3 (As 3) is even better. Some of the benefits you might find pleasing include:

Runtime exception reporting

This allows the developer to see runtime failures in the code. Actionscript 2 fails silently when running to protect the user from seeing developer intended error messages.

EMCAScript for XML (E4X)

This basically means XML handling is built into the language. You can avoid parsing XML into object trees as it is automatic.

Regular Expressions

At last fast manipulation and processing of string. No more loops to trim spaces for example.

New Primitive Types

Number is the data type in AS 2.0. With AS 3.0 you have int for example that will take advantage of faster CPU math processing features.

Decomposed Display API

The display API is not soley dependent on the bulging MovieClip class. A lighter Sprite class is available. As well there is a Shape class to remove all that vector drawing code. So for basic vector shape UI items you can use the Sprite and Shape class and drop the overhead of the MovieClip class.

Event Handling is part of the Language

In AS 2.0 we needed to use additional code to register event listener. This was found deep in the Component documentation as the EventDispatcher and Delegate classes. In AS you had to build the equivalent of these for your projects and use the Function class methods for the call backs as one technique.

Categories
Articles

Flex 2 Publishing with Source

You can publish the source code for a Flex application. Users can use the context menu and see a “View Source” menu choice if you include the viewSourceURL attribute for the Application class.

Ex:

When the context menu is selected the document with source is loaded into the primary web browser.

If you test this locally with the mxmlc compiler, you will encounter a security error so you
might want to compile with the -use-network=false switch temporarily so you can play.

More information can be found at: Publishing application source code sdfs