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.
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
- 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. - 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.
- 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.
- 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. - Once you have fixed and closed the element, rerun the tool to display any elements that contain remaining errors.
- Repeat the process until no more errors are reported.