
38
Class Reference
4.2.1.3
prompt
The gui.prompt function displays text in the display area of the standard GUI display and
returns a value based on the key pressed. Do not call this function within onDecode and
onCommand event handlers.
Format:
gui.prompt(func, text, initial, title);
Where:
func
– function name. Function to be called when prompt receives an enter key. The
function takes one argument named
result
and returns void.
result
– string; This is the argument to the function. It provides contents of the edit
control if the prompt receives an enter key (either the enter key or the left softkey defined
as
OK
); null if the prompt receives the right softkey defined as
Cancel
.
text
– string; text to display as a label above a
gui.Edit
control.
initial
– string; the initial string to display as the contents of edit control; default is an
empty string.
title
– string; text to display in the gui object status bar; defaults to “Prompt”.
Processing suspends until the operator presses an enter key or
Cancel
key. The operator
can key new data into the edit control before pressing enter or the left softkey.
Example:
gui.prompt(postPromptFunc, "Enter login ID", "None",
"guiPrompt");
Displays the prompt shown in Figure 9 – gui.Prompt Example.
Figure 9 – gui.Prompt Example
The postPromptFunc would be defined as follows
postPromptFunc = function(string) {
//Continue after prompt…
}
Содержание OHV300
Страница 1: ...FACTORY AUTOMATION MANUAL JAVASCRIPT PROGRAMMING GUIDE...
Страница 88: ...88 Supported JavaScript Core delete function in instanceof new this typeof void...
Страница 93: ...93 Symbology ID Modifier Information...
Страница 94: ...TDOCT 4981_ENG 11 2015...