Compiling scripts

After you write a script, the script must be compiled into a form that can be used at runtime. Dexterity has a built-in compiler that will compile a script when you click Compile. If you want to save the script without compiling it, choose Save Source from the Script menu.

Compiler messages

The compiler in Dexterity returns two types of messages. Compiler errors are problems in a script that prevent it from being compiled, such as syntax errors. Compiler warnings are less serious problems that won’t prevent a script from being compiled, but should be resolved. An example of a compiler warning is a local variable that is declared, but not used.

If any errors or warnings are encountered during compiling, they will be listed at the bottom of the Script Editor window. Use the Previous and Next buttons at the bottom of the Script Editor to move from one message to the next. As you move from message to message, the appropriate line in the Script Editor will be selected.

A compiler error is shown in the following illustration.

[spacer]

You can also display compiler messages in the Compile Messages window, shown in the following illustration.

[spacer]

Open the Compile Messages window by clicking the Compile Message button in the Script Editor. To have the window open automatically when any compiler errors occur, mark the Open Compiler Messages On Errors item in the Options window in Dexterity. You can also choose whether the Compile Messages window will display compiler errors, compiler warnings, or both types of messages.

[spacer]

When the Script Editor window is open, The Compile Messages window shows the errors and warnings for the current script. If the Script Editor is not open, the Compile Messages window lists all of the compiler messages from the last scripts that were compiled.

Compiling multiple scripts

To compile all scripts for a form or group of forms, select the form or forms in the Resource Explorer, and then click the Compile button. All of the scripts for the form, including window and field scripts, will be compiled.

If you would like to compile all scripts in your dictionary, click the Compile Dictionary button in the Resource Explorer toolbar. A progress indicator will be displayed, showing the progress of the compile operation.


Documentation Feedback