Compiling Methods

When you have defined or modified a method, you must compile it before you can execute it. (You cannot compile system methods.)

To compile the current method, perform one of the following actions

The method is then compiled. The first syntax error that is detected is highlighted and the corresponding error message is displayed in the status line, to enable you to amend the code, as required, before compiling and executing your method again.

Only the first error in the logic is reported. When that error has been corrected and the method recompiled, any following error is reported individually, or the compilation completed.

If configured in your preferences, the Compiler Output Viewer is automatically displayed when you compile a class or method that generates error, warning, or information compiler messages. For details, see "Using the Compiler Output Viewer", later in this chapter.

When the method is compiled and no errors are detected, the message Compilation complete - no errors is displayed in the status line.

To view methods that require compilation, select one of the following Browse menu commands

A progress dialog is then displayed while the classes are scanned for methods that require compilation. If any method requires compilation or contains errors, the Methods Status List dialog, shown in the following image, is then displayed.

Alternatively, you can view code for a method that contains compilation errors by selecting a method in the Methods List whose compilation error icon to the left of the method indicates that it contains one or more compilation errors.

For details about compiling all methods in a class, primitive type, or interface, see "Compiling All Methods Defined in a Class, Primitive Type, or Interface", in Chapter 3. For details about recompiling all methods in your Jade database that have not yet been compiled or are in error, see "Recompiling All Methods in the Database", in the following subsection. See also "Compiling an Interface Method", in Chapter 14.