Prompt properties in consoleUI

The following unique properties are available for prompt variables. None of the properties 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
The following values are valid for isChar:
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 ON_KEY type OnEvent clause.

message
Specifies the text that prompts the user.
  • Type: STRNG
  • 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 consoleLib.messageResource system variable; for more information, see messageResource (EGL system variable).

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 more information about responseAttr values, see PresentationAttributes properties.


Feedback