Command group | Flag affected | Reversible | Execute on client | Platform(s) |
---|---|---|---|---|
Enter data | YES | NO | NO | All |
Enter data until termination-condition (leave blank to terminate on OK or Cancel)
This command puts Omnis into enter data mode which allows data to be entered via the current window. An error is generated if there is no open window. It initiates an internal control loop which does the following:
Places the cursor in the first entry field,
Lets the user enter data from the keyboard,
Detects the use of Tab, Shift-Tab and other cursor movements such as click and moves the cursor to the appropriate field,
Waits for an OK, setting flag true before allowing control to pass to the command following Enter data in the method,
Detects a Cancel which aborts data entry with a false flag.
By default, the Enter data command waits for an evOK or evCancel event. When these events are triggered enter data mode is terminated (assuming the window is not in modeless enter data mode). However you can include a termination condition with Enter data which causes enter data mode to continue until the expression becomes true.
# $construct of window class
Enter data ## waits for a evOK or evCancel event
If flag true
OK message {User has pressed Return}
Else
OK message {User has canceled}
End If
# or
# $construct of window class
Calculate iValue as 0