Screen Handling (PC Version)
The screen handling function enables developing programs interacting with the
user. In addition to speeding up the design of efficient screen maps, ULTIM can
also automatically validate and handle the data entered.
Being completely integrated in the ULTIM language, the screen handling can be
intermixed with other functions, mainly, report generation, database access,
etc.
The user can alter the default operation of the system as a whole or act on
individual elements displayed:
- Conditional display of lines and elements.
- Edit masks and item attributes (bright, hidden, non-modifiable, etc.).
- Data validation rules.
- Field updating rules.
- Cursor positioning and keyboard locking.
- Assignment of the various keys to the desired functions.
- Processing according to the function keys depressed.
Moreover, once the map is displayed and data has been typed in, a powerful
sequence of operations is automatically performed:
- Validation of the data according to its type.
- Validation according to the values permitted and the data that is mandatory.
- Highlighting of the erroneous fields and automatic display of messages.
- Looping back into wait status until all conditions are satisfied.
- Transformation of the edited data into an internal unedited format.
- Transfer of the data back to the original or otherwise indicated fields.
Here is an example of a displayed menu
| 2015/05/06
13:59:51 MAIN MENU
1. CUSTOMER MAINTENANCE
2. ORDER ENTRY 3. CUSTOMER INQUIRY
4. INVOICING
YOUR CHOICE:
F3 TO QUIT
_ _ _ _ _ _ _ _text of the error message if any_ _ _ _ _ _ _
| |
Here is the coding requested to obtain that result
BEGIN DEMO. DEFINE CHOICE(N,1,@ED:@CODE(B)). * Map of definition DISPLAY '!CLS !BRK=3D00'. ; clear the screen; permit F3 to exit DISPLAY '!LIN=1', @DATE, SPACE(62), @TIME. DISPLAY '!LIN=3', SPACE(35), 'MAIN MENU'. DISPLAY '!LIN=5', SPACE(26), '1. CUSTOMER MAINTENANCE'. DISPLAY '!LIN=7', SPACE(26), '2. ORDER ENTRY'. DISPLAY '!LIN=9', SPACE(26), '3. CUSTOMER INQUIRY'. DISPLAY '!LIN=11', SPACE(26), '4. INVOICING'. DISPLAY '!LIN=13', SPACE(26), 'YOUR CHOICE: ',
CHOICE
(MANDATORY, VALID IF = 1 TO 4). DISPLAY '!LIN=15', SPACE(70), 'F3 TO QUIT'. DISPLAY '!LIN=24', @MESSAGE. DISPLAY '!REP !SUP'. ; check the reply; mark the updates as done
CRIT-10 CHOICE = 1. EXECUTE 'CUSTUPD' LINK. ELSE-10 CHOICE = 2. EXECUTE 'CUSORDER' LINK. ELSE-10 CHOICE = 3. EXECUTE 'CUSTINQ' LINK. ELSE-10 CHOICE = 4. EXECUTE 'CUSTINV' LINK. END
|