%Library.Prompt
abstract class %Library.Prompt extends %SYSTEM.Help
Handles prompting for chui applications.Method Inventory
Methods
classmethod GetArray(Prompt As %String, ByRef Value As %String, ByRef List As %String, MinLen As %Integer, MaxLen As %Integer, ByRef Help As %String, Flag As %Integer = 0, Timeout As %Integer = 0) as %Integer
Prompt for a number or entry in a displayed menu. Returns the selected item.
Input Parameters:
Prompt - Prompt to be displayed
Value - Default value
List - Array of menu items. This should be in one of the following two forms:
List(1)="Option 1"
List(2)="Option 2"
List(n)="Option n"
If List(n,0) exist then the help (? entered) will display List(n)_List(n,0).
or
$lb(QueryName,ExecuteParam1,ExecuteParam2,ExecuteParamN)
For example: $lb("SYS.Database:List","*")
Help - Array of help text
Flag - From %syPrompt.inc
- $$$DisableBackupCharMask - Disable entry of the backup character
- $$$TrapCtrlCMask - Trap CTRL/C and return CTRL/C status
- $$$EnableQuitCharMask - Enable quit and return Quit status
- $$$DisableHelpCharMask - Disable entry of the help character
- $$$DisableHelpContextCharMask - Disable entry of the help context character
- $$$TrapErrorMask - Trap errors and return error status
- $$$InitialDisplayMask - Display the menu when initially called
- $$$AllowNullMask - Allow null entry
- $$$EnableMultipleSelectionMask - Allow comma delimited numeric entry, ranges, and * for all
- $$$MatchExactArrayMask - Only entries from the the array of options are allowed, case sensitive
- $$$MatchArrayMask - Only entries from the array of options are allowed, not case sensitive
TimeOut - Timeout for prompt
Output parameters:
Status - One of the following from %syPrompt:
$$$SuccessResponse - Successful entry, Value contains valid open device
$$$BackupResponse - Backup character entered
$$$QuitResponse - Quit character entered if $$$EnableQuitCharMask set
$$$CtrlCResponse - CTRL/C entered if $$$TrapCtrlCMask set
$$$ErrorResponse - Error during entry if $$$TrapErrorMask set
$$$HelpResponse - Help character entered if $$$DisableHelpCharMask set
$$$HelpContextResponse - Help character entered if $$$DisableHelpContextCharMask set
Value - Value of selected item; or if the $$$EnableMultipleSelectionMask flag is used, a list of selected items in $listbuild format.
If the size of the selected set exceeds the maximum local variable string size either an error will be thrown or if $$$TrapErrorMask is specified, an error will be returned
Input Parameters:
Prompt - Prompt to be displayed
Value - Default value
List - Array of menu items. This should be in one of the following two forms:
List(1)="Option 1"
List(2)="Option 2"
List(n)="Option n"
If List(n,0) exist then the help (? entered) will display List(n)_List(n,0).
or
$lb(QueryName,ExecuteParam1,ExecuteParam2,ExecuteParamN)
For example: $lb("SYS.Database:List","*")
Help - Array of help text
Flag - From %syPrompt.inc
- $$$DisableBackupCharMask - Disable entry of the backup character
- $$$TrapCtrlCMask - Trap CTRL/C and return CTRL/C status
- $$$EnableQuitCharMask - Enable quit and return Quit status
- $$$DisableHelpCharMask - Disable entry of the help character
- $$$DisableHelpContextCharMask - Disable entry of the help context character
- $$$TrapErrorMask - Trap errors and return error status
- $$$InitialDisplayMask - Display the menu when initially called
- $$$AllowNullMask - Allow null entry
- $$$EnableMultipleSelectionMask - Allow comma delimited numeric entry, ranges, and * for all
- $$$MatchExactArrayMask - Only entries from the the array of options are allowed, case sensitive
- $$$MatchArrayMask - Only entries from the array of options are allowed, not case sensitive
TimeOut - Timeout for prompt
Output parameters:
Status - One of the following from %syPrompt:
$$$SuccessResponse - Successful entry, Value contains valid open device
$$$BackupResponse - Backup character entered
$$$QuitResponse - Quit character entered if $$$EnableQuitCharMask set
$$$CtrlCResponse - CTRL/C entered if $$$TrapCtrlCMask set
$$$ErrorResponse - Error during entry if $$$TrapErrorMask set
$$$HelpResponse - Help character entered if $$$DisableHelpCharMask set
$$$HelpContextResponse - Help character entered if $$$DisableHelpContextCharMask set
Value - Value of selected item; or if the $$$EnableMultipleSelectionMask flag is used, a list of selected items in $listbuild format.
If the size of the selected set exceeds the maximum local variable string size either an error will be thrown or if $$$TrapErrorMask is specified, an error will be returned
classmethod GetMenu(Prompt As %String, ByRef Value As %Integer, ByRef List As %String, ByRef Help As %String, Flag As %Integer = 0, Timeout As %Integer = 0) as %Integer
Prompt for a number in a displayed menu.
Input Parameters:
Prompt - Prompt to be displayed
Value - Default value
List - Array of menu items. This should be in one of the following two forms:
List(1)="Option 1"
List(2)="Option 2"
List(n)="Option n"
or
$lb(QueryName,ExecuteParam1,ExecuteParam2,ExecuteParamN)
For example: $lb("SYS.Database:List","*")
Help - Array of help text
Flag - From %syPrompt.inc
- $$$DisableBackupCharMask - Disable entry of the backup character
- $$$TrapCtrlCMask - Trap CTRL/C and return CTRL/C status
- $$$EnableQuitCharMask - Enable quit and return Quit status
- $$$DisableHelpCharMask - Disable entry of the help character
- $$$DisableHelpContextCharMask - Disable entry of the help context character
- $$$TrapErrorMask - Trap errors and return error status
- $$$InitialDisplayMask - Display the menu when initially called
TimeOut - Timeout for prompt
Output parameters:
Status - One of the following from %syPrompt:
$$$SuccessResponse - Successful entry, Value contains valid open device
$$$BackupResponse - Backup character entered
$$$QuitResponse - Quit character entered if $$$EnableQuitCharMask set
$$$CtrlCResponse - CTRL/C entered if $$$TrapCtrlCMask set
$$$ErrorResponse - Error during entry if $$$TrapErrorMask set
$$$HelpResponse - Help character entered if $$$DisableHelpCharMask set
$$$HelpContextResponse - Help context character entered if $$$DisableHelpContextCharMask set
Value - Entered number
Input Parameters:
Prompt - Prompt to be displayed
Value - Default value
List - Array of menu items. This should be in one of the following two forms:
List(1)="Option 1"
List(2)="Option 2"
List(n)="Option n"
or
$lb(QueryName,ExecuteParam1,ExecuteParam2,ExecuteParamN)
For example: $lb("SYS.Database:List","*")
Help - Array of help text
Flag - From %syPrompt.inc
- $$$DisableBackupCharMask - Disable entry of the backup character
- $$$TrapCtrlCMask - Trap CTRL/C and return CTRL/C status
- $$$EnableQuitCharMask - Enable quit and return Quit status
- $$$DisableHelpCharMask - Disable entry of the help character
- $$$DisableHelpContextCharMask - Disable entry of the help context character
- $$$TrapErrorMask - Trap errors and return error status
- $$$InitialDisplayMask - Display the menu when initially called
TimeOut - Timeout for prompt
Output parameters:
Status - One of the following from %syPrompt:
$$$SuccessResponse - Successful entry, Value contains valid open device
$$$BackupResponse - Backup character entered
$$$QuitResponse - Quit character entered if $$$EnableQuitCharMask set
$$$CtrlCResponse - CTRL/C entered if $$$TrapCtrlCMask set
$$$ErrorResponse - Error during entry if $$$TrapErrorMask set
$$$HelpResponse - Help character entered if $$$DisableHelpCharMask set
$$$HelpContextResponse - Help context character entered if $$$DisableHelpContextCharMask set
Value - Entered number
classmethod GetMore(Prompt As %String = "-more-", ByRef Help As %String, Flag As %Integer = $$$EnableQuitCharMask, Timeout As %Integer = 0) as %Integer
Prompt for More or Quit.
Input Parameters:
Prompt - Prompt to be displayed
Help - Array of help text
Flag - From %syPrompt.inc
- $$$DisableBackupCharMask - Disable entry of the backup character
- $$$TrapCtrlCMask - Trap CTRL/C and return CTRL/C status
- $$$EnableQuitCharMask - Enable quit and return Quit status
- $$$DisableHelpCharMask - Disable entry of the help character
- $$$TrapErrorMask - Trap errors and return error status
TimeOut - Timeout for prompt
Output parameters:
Status - One of the following from %syPrompt:
$$$SuccessResponse - Successful entry, Value contains valid open device
$$$BackupResponse - Backup character entered
$$$QuitResponse - Quit character entered if $$$EnableQuitCharMask set
$$$CtrlCResponse - CTRL/C entered if $$$TrapCtrlCMask set
$$$ErrorResponse - Error during entry if $$$TrapErrorMask set
$$$HelpResponse - Help character entered if $$$DisableHelpCharMask set
Value - Entered number
Input Parameters:
Prompt - Prompt to be displayed
Help - Array of help text
Flag - From %syPrompt.inc
- $$$DisableBackupCharMask - Disable entry of the backup character
- $$$TrapCtrlCMask - Trap CTRL/C and return CTRL/C status
- $$$EnableQuitCharMask - Enable quit and return Quit status
- $$$DisableHelpCharMask - Disable entry of the help character
- $$$TrapErrorMask - Trap errors and return error status
TimeOut - Timeout for prompt
Output parameters:
Status - One of the following from %syPrompt:
$$$SuccessResponse - Successful entry, Value contains valid open device
$$$BackupResponse - Backup character entered
$$$QuitResponse - Quit character entered if $$$EnableQuitCharMask set
$$$CtrlCResponse - CTRL/C entered if $$$TrapCtrlCMask set
$$$ErrorResponse - Error during entry if $$$TrapErrorMask set
$$$HelpResponse - Help character entered if $$$DisableHelpCharMask set
Value - Entered number
classmethod GetNumber(Prompt As %String, ByRef Value As %Integer, Min As %Integer, Max As %Integer, ByRef Help As %String, Flag As %Integer = 0, Timeout As %Integer = 0) as %Integer
Prompt for a number.
Input Parameters:
Prompt - Prompt to be displayed
Value - Default value
Min - Minimum value allowed
Max - Maximum value allowed
Help - Array of help text
Flag - From %syPrompt.inc
- $$$DisableBackupCharMask - Disable entry of the backup character
- $$$TrapCtrlCMask - Trap CTRL/C and return CTRL/C status
- $$$EnableQuitCharMask - Enable quit and return Quit status
- $$$DisableHelpCharMask - Disable entry of the help character
- $$$DisableHelpContextResponse - Disable entry of the help context character
- $$$TrapErrorMask - Trap errors and return error status
- $$$AllowNullMask - Allow null entry TimeOut - Timeout for prompt
Output parameters:
Status - One of the following from %syPrompt:
$$$SuccessResponse - Successful entry, Value contains valid open device
$$$BackupResponse - Backup character entered
$$$QuitResponse - Quit character entered if $$$EnableQuitCharMask set
$$$CtrlCResponse - CTRL/C entered if $$$TrapCtrlCMask set
$$$ErrorResponse - Error during entry if $$$TrapErrorMask set
$$$HelpResponse - Help character entered if $$$DisableHelpCharMask set
$$$HelpContextResponse - Help context character entered if $$$DisableHelpContextCharMask set
Value - Entered number
Input Parameters:
Prompt - Prompt to be displayed
Value - Default value
Min - Minimum value allowed
Max - Maximum value allowed
Help - Array of help text
Flag - From %syPrompt.inc
- $$$DisableBackupCharMask - Disable entry of the backup character
- $$$TrapCtrlCMask - Trap CTRL/C and return CTRL/C status
- $$$EnableQuitCharMask - Enable quit and return Quit status
- $$$DisableHelpCharMask - Disable entry of the help character
- $$$DisableHelpContextResponse - Disable entry of the help context character
- $$$TrapErrorMask - Trap errors and return error status
- $$$AllowNullMask - Allow null entry TimeOut - Timeout for prompt
Output parameters:
Status - One of the following from %syPrompt:
$$$SuccessResponse - Successful entry, Value contains valid open device
$$$BackupResponse - Backup character entered
$$$QuitResponse - Quit character entered if $$$EnableQuitCharMask set
$$$CtrlCResponse - CTRL/C entered if $$$TrapCtrlCMask set
$$$ErrorResponse - Error during entry if $$$TrapErrorMask set
$$$HelpResponse - Help character entered if $$$DisableHelpCharMask set
$$$HelpContextResponse - Help context character entered if $$$DisableHelpContextCharMask set
Value - Entered number
classmethod GetString(Prompt As %String, ByRef Value As %String, MinLen As %Integer, MaxLen As %Integer, ByRef Help As %String, Flag As %Integer = 0, Timeout As %Integer = 0) as %Integer
Prompt for a String.
Input Parameters:
Prompt - Prompt to be displayed
Value - Default value
Min - Minimum length of string allowed
Max - Maximum length of string allowed
Help - Array of help text
Flag - From %syPrompt.inc
- $$$DisableBackupCharMask - Disable entry of the backup character
- $$$TrapCtrlCMask - Trap CTRL/C and return CTRL/C status
- $$$EnableQuitCharMask - Enable quit and return Quit status
- $$$DisableHelpCharMask - Disable entry of the help character
- $$$DisableHelpContextCharMask - Disable entry of the help context character
- $$$TrapErrorMask - Trap errors and return error status
TimeOut - Timeout for prompt
Output parameters:
Status - One of the following from %syPrompt:
$$$SuccessResponse - Successful entry, Value contains valid open device
$$$BackupResponse - Backup character entered
$$$QuitResponse - Quit character entered if $$$EnableQuitCharMask set
$$$CtrlCResponse - CTRL/C entered if $$$TrapCtrlCMask set
$$$ErrorResponse - Error during entry if $$$TrapErrorMask set
$$$HelpResponse - Help character entered if $$$DisableHelpCharMask set
$$$HelpContextResponse - Help character entered if $$$DisableHelpContextCharMask set
Value - Entered String
Input Parameters:
Prompt - Prompt to be displayed
Value - Default value
Min - Minimum length of string allowed
Max - Maximum length of string allowed
Help - Array of help text
Flag - From %syPrompt.inc
- $$$DisableBackupCharMask - Disable entry of the backup character
- $$$TrapCtrlCMask - Trap CTRL/C and return CTRL/C status
- $$$EnableQuitCharMask - Enable quit and return Quit status
- $$$DisableHelpCharMask - Disable entry of the help character
- $$$DisableHelpContextCharMask - Disable entry of the help context character
- $$$TrapErrorMask - Trap errors and return error status
TimeOut - Timeout for prompt
Output parameters:
Status - One of the following from %syPrompt:
$$$SuccessResponse - Successful entry, Value contains valid open device
$$$BackupResponse - Backup character entered
$$$QuitResponse - Quit character entered if $$$EnableQuitCharMask set
$$$CtrlCResponse - CTRL/C entered if $$$TrapCtrlCMask set
$$$ErrorResponse - Error during entry if $$$TrapErrorMask set
$$$HelpResponse - Help character entered if $$$DisableHelpCharMask set
$$$HelpContextResponse - Help character entered if $$$DisableHelpContextCharMask set
Value - Entered String
classmethod GetYesNo(Prompt As %String, ByRef Value As %Integer, ByRef Help As %String, Flag As %Integer = 0, Timeout As %Integer = 0) as %Integer
Prompt for a Yes/No answer.
Input Parameters:
Prompt - Prompt to be displayed
Value - Default value 0=No, 1=Yes
Help - Array of help text
Flag - From %syPrompt.inc
- $$$DisableBackupCharMask - Disable entry of the backup character
- $$$TrapCtrlCMask - Trap CTRL/C and return CTRL/C status
- $$$EnableQuitCharMask - Enable quit and return Quit status
- $$$DisableHelpCharMask - Disable entry of the help character
- $$$TrapErrorMask - Trap errors and return error status
TimeOut - Timeout for prompt
Output parameters:
Status - One of the following from %syPrompt:
$$$SuccessResponse - Successful entry, Value contains valid open device
$$$BackupResponse - Backup character entered
$$$QuitResponse - Quit character entered if $$$EnableQuitCharMask set
$$$CtrlCResponse - CTRL/C entered if $$$TrapCtrlCMask set
$$$ErrorResponse - Error during entry if $$$TrapErrorMask set
$$$HelpResponse - Help character entered if $$$DisableHelpCharMask set
Value - 0=No, 1=Yes
Input Parameters:
Prompt - Prompt to be displayed
Value - Default value 0=No, 1=Yes
Help - Array of help text
Flag - From %syPrompt.inc
- $$$DisableBackupCharMask - Disable entry of the backup character
- $$$TrapCtrlCMask - Trap CTRL/C and return CTRL/C status
- $$$EnableQuitCharMask - Enable quit and return Quit status
- $$$DisableHelpCharMask - Disable entry of the help character
- $$$TrapErrorMask - Trap errors and return error status
TimeOut - Timeout for prompt
Output parameters:
Status - One of the following from %syPrompt:
$$$SuccessResponse - Successful entry, Value contains valid open device
$$$BackupResponse - Backup character entered
$$$QuitResponse - Quit character entered if $$$EnableQuitCharMask set
$$$CtrlCResponse - CTRL/C entered if $$$TrapCtrlCMask set
$$$ErrorResponse - Error during entry if $$$TrapErrorMask set
$$$HelpResponse - Help character entered if $$$DisableHelpCharMask set
Value - 0=No, 1=Yes