Recompiling all LotusScript

About this task

The Recompile all LotusScript feature enables you to recompile every piece of LotusScript code contained in a database.

Being able to recompile all the LotusScript code in a database is especially useful if, for instance, you want to make a change to a LotusScript script library that you have incorporated into several design elements across a database. By recompiling all LotusScript, you can retrieve a list of all the design elements that incorporate the now incorrect code and use your time to fix the code rather than to try to find coding errors and inconsistencies.

Note: This feature is new with Release 6.

A recompile takes two passes at a database. The first pass identifies all the elements that contain LotusScript code and need to be recompiled. The second pass recompiles all the elements identified in the first pass and saves them again. It then displays a list of those elements in which it found scripting errors. You can open each element from the list to find and fix its errors.

To recompile all the LotusScript code in a database

Procedure

  1. From the Designer menu, select Tools - Recompile All LotusScript.
    Tip: The Recompile option of the Tools menu is not enabled if you do not have a specific database or a design element from a specific database selected.

    The Compile all LotusScript in dbname dialog box displays and begins recompiling the LotusScript code in the database. (dbname is the name of the current database)

    Tip: To stop recompilation, press CNTRL+BREAK, then Cancel. Canceling the operation may leave some LotusScript objects in an inconsistent state.
  2. If none of the LotusScript code in the database has any errors, the Design Elements list displays all the elements that were compiled and "All code successfully compiled" displays following it. Click Ok to close the dialog box.
  3. If any errors are found, the Design Elements list displays the elements that contain errors and "Not all elements compiled successfully" displays following it. Either:
    • To close the dialog box without fixing the incorrect code, click Cancel.
    • To edit an element, select it from the list and click Ok.

    The selected element displays in the programmer's pane.

  4. Click each script object to display its associated code and find the error.

    The text of the line of code that contains the error displays in red and the error is defined in the Errors box. You cannot save and close the object until all errors present are corrected.

    Tip: If you want to save a script with errors, make the incorrect line a remark by preceding it with an apostrophe or a REM statement, or setting it off with a %REM ... %END REM directive.
  5. Once you have fixed and closed the element, rerun the tool to display any elements that contain remaining errors.
  6. Repeat the process until no more errors are reported.