Adobe Flex 3 Help

About syntax error checking

The Flex Builder compiler identifies syntax errors and reports them to you so that you can correct them as you are working, before you attempt to run your application. You can easily adjust syntax coloring preferences.

When code syntax errors are encountered, you are notified in the following ways:

  • An error indicator is added next to the line of code, as the following example shows:

    Error indicator

  • The Outline view indicates the error with an exclamation mark in the affected lines of code, as the following example shows:

  • The Problems view lists an error symbol and message. Double-clicking the error message locates and highlights the line of code in the editor, as the following example shows:

    Problems view

Coding syntax errors are identified when your projects are built. If you do not fix syntax errors before you run your application, you are warned that errors exist. Depending on the nature and severity of the errors, your application might not run properly until the errors are corrected.

Apply syntax coloring preferences

 Open the Preferences dialog and select Flex > Editors > Syntax Coloring.

Syntax coloring preferences

Default font colors can also be configured on the Text Editors and Colors and Fonts Preferences pages (see Window > Preferences > General > Appearance > and Window > Preferences > General > Editors > Text Editors).

Using the Problems view

As you enter and save your code, Flex Builder compiles it in the background and displays syntax errors and warnings (problems) to you in the Problems view. Each error or warning contains a message, the file and folder in which it is located, and its line number in the file. When you double-click on a line of code, the file is opened in the editor and the line of code is highlighted.

Go to the line of code where an error or warning occurs

 Double-click a problem in the Problems view; or select a problem and then right-click (Windows) or Control-click (Mac OS) to display the context menu and select Go To.