Automatically completing statements

Use auto completion to look up and paste syntax elements right into the Programmer's pane as you enter code. Auto completion uses type-ahead functionality to let you quickly find and select the options you want, and also provides parameter prompting to show you how to complete a statement.

Note: Auto completion is new with Release 6.

Use auto completion when programming the following:

  • Formula language @functions
  • Formula language @commands
  • LotusScript classes

Using auto completion for formula language @functions

In the Programmer's pane, follow these conventions to use auto completion:

  • Enter the at (@) symbol to trigger auto complete. A pop-up list of available @functions appears.

    From the pop-up list, you can either type ahead to select the function you need, or scroll through the list and select it. Press ENTER to paste the function into the Script area and close the list.

  • If the function has a parameter list, type an opening parenthesis ( ( ) to display a pop-up box with the parameter prompt. The syntax of the first parameter appears in bold.
  • If the function has keyword options, up and down arrows display surrounding two colon-delimited numbers. The first number identifies the number of the first keyword option, which is displayed in bold; the second number identifies the total number of keyword options to choose from. For example, @Prompt contains ten keyword options of which [OK] is the first. @Prompt displays as follows in the auto completion pop-up:

    The up and down arrows indicate that you can click the up and down keyboard keys to display each option in the list of keyword options.

    up arrow1:10 down arrow@Prompt( [OK]; title;prompt)

    If you click the down arrow key on the keyboard, the display changes to display the second keyword option:

     2:10 @Prompt([YesNo]; title;prompt)
  • Type a semicolon ( ; ) after each parameter. The syntax of the next parameter in the string appears in bold.
  • Type a closing parenthesis ( ) ) or press ESC to close the pop-up box.

Using auto completion for formula language @commands

In the Programmer's pane, follow these conventions to use auto completion:

  • Enter an at sign (@) to see a pop-up list of functions. Select "command" from the list and then enter an opening parenthesis ( ( ). A pop-up list of command names appears.

    From the pop-up list, you can either type ahead to select the command name you need, or scroll through the list and select it. Press ENTER to paste the command into the Script area and close the list. Brackets are automatically placed around the command name like this:

    @Command([EditFind]

  • If the command has a parameter list, type a semicolon ( ; ) to display a pop-up box with the parameter list. The syntax of the first parameter appears in bold.

    Type a semicolon ( ; ) after each parameter. The syntax of the next parameter in the string appears bold.

    Type a closing parenthesis ( ) ) or press ESC to close the pop-up box.

Using auto completion for LotusScript class statements

In the Programmer's pane, follow these conventions to use auto completion:

  • When declaring an object using the Dim statement, enter the word As followed by a SPACE to trigger the pop-up list of available classes, as in this example:

    Dim doc As[SPACE]

    From the pop-up list, you can either type ahead to select the class you need, or scroll through the list and select it. Press ENTER to paste the class into the Script area and close the list.

  • To see a list of available properties and methods for a class, enter a period ( . ) after an object name.

    From the pop-up list, you can either type ahead to select the element you need, or scroll through the list and select it. Press ENTER to paste the element into the Script area and close the list.

  • If a method has a parameter list, type an open parenthesis ( ( ) to display a pop-up box with the parameter list. The syntax of the first parameter appears in bold.

    Type a comma ( , ) after each parameter. The syntax of the next parameter in the string appears bold.

    Type a closing parenthesis ( ) ) or press ESC to close the pop-up box.

To enable/disable auto completion

Auto completion is enabled by default. Use the Auto Complete tab on the Programmer's Pane Properties box to change auto completion settings.

Note that even if the options are disabled you can still use the menu commands or accelerator keys to display pop-up lists or boxes.

To redisplay a list of options, you can do any of the following:

  • Choose Edit - List Members from the menu
  • Press CTRL+ALT+T
  • Type an at sign (@) when writing formula language code, if auto completion is enabled

To redisplay a parameter box, if one is applicable in this situation, you can do either of the following:

  • Choose Edit - Parameter Info from the menu
  • Press CTRL+SHIFT+SPACE

Options on the Auto Complete tab

The options on the Auto Complete tab apply to all languages. Select or deselect the options as follows.

Option

Description

Default

Auto List Member box

A pop-up list of available options automatically displays when you begin typing code.

The default is enabled. To disable auto lists, deselect this box.

Auto Parameter Popup box

If an option has a parameter list, a pop-up box with a parameter prompt appears when you type a language-specific trigger, such as an open parenthesis ( ( ) for @functions.

The default is enabled. To disable parameter prompting, deselect this box.

Delay box

The value is the amount of time to wait between a trigger keystroke and another keystroke before a pop-up list displays. If you type a second keystroke before the time has elapsed, the pop-up list does not appear. The value is in milliseconds.

The default is 200 milliseconds.