The
following list defines the fields in a variable of type Prompt. None of the
fields is required.
- isChar
- Indicates whether, after the prompt is displayed, the user's first keystroke
ends the operation.
- Type: Boolean
- Example: isChar = yes
- Default: no
- Updatable at run time? Yes
Values are as follows:
- no (the default)
- The operation ends when the user presses Enter or presses a key
associated with an OnEvent clause of the openUI statement that displays
the prompt. The variable to which the prompt is bound receives the input characters.
- yes
- The user's first keystroke ends the operation. The variable to which the
prompt is bound receives the character, if the character is printable.
In either case, you can respond to a particular keystroke
by setting an OnEvent clause of type ON_KEY.
- message
- Specifies the text that prompts the user.
- Type: String
- Example: message = "Type here: "
- Default: Empty string
- Updatable at run time? Yes, before your code issues the openUI statement
- messageKey
- Specifies a key used to search the resource bundle that includes the prompt
text. If you specify both message and messageKey, message is
used.
- Type: String
- Example: messageKey = "promptText"
- Default: Empty string
- Updatable at run time? Yes
The resource bundle is identified by the system variable ConsoleLib.messageResource,
as described in messageResource.
- responseAttr
- Specifies the presentation attributes that are used when displaying user
input.
- Type: PresentationAttributes literal
- Example: responseAttr {color = green, highlight = [underline],
intensity = [bold]}
- Default: no
- Updatable at run time? Yes
This field has an effect only if the field isChar is set to no.
For
details on responseAttr values, see PresentationAttributes fields
in EGL consoleUI.