Timing Cycle and GUI screens |
DEVELOPER |
The PROIV Timing Cycle is based on the assumption that the fields will be visited in consecutive order but a GUI screen must support the visiting of fields in random order. PROIV Functions can be written to support this concept but there are some problems that are difficult to overcome with programming.
A common technique for GUI screens is to define the Last Change Field as 0. This allows the user to visit any field in any order. If the user skips around, the underlying Timing Cycle executes all fields, detecting Mandatory Input fields, executing after field logic and reading files.
There are two problems with this technique:
When fields are skipped, the Before Field logic is not executed. Similarly, when EOD is executed from any field other than the last one, the remaining fields are processed in the same way. This is consistent with the way tabbing is handled but there are requests to execute the before field logic. Before field logic may be needed by programmers who do not structure their logic in a disciplined fashion
GUI screens are often exited via a that is attached to logic. The logic uses EODEXIT(1) to save the record and exit the screen. However, the behaviour of PROIV when the last change field is 0 and the cursor is in the first enterable field of the screen is to turn EOD to CANCEL. So in these GUI screens, if the user makes changes in various fields and leaves with the cursor in the first field, EODEXIT is turned to CANCEL and the data is not saved.
EODEXIT(VALIDATE) will cause the execution of both the before and after field logic for each intervening field before the save and exit. See also .FORCEWRITE.
Last Change Field |
The field in the Timing Cycle on which all files are read and the data displayed on the screen. |
First enterable field |
The first field on the screen that can accept data. For Paging Screens and Flat Screens with no Last Change Field (=0), exit from this field is treated as cancel |
EOD |
End of data. Instructs the Timing Cycle to save the record. |
CANCEL |
Exit screen without saving |
EODEXIT(1) |
A Logic Command that mimics the behaviour of entering EOD from the keyboard. |
Topic ID: 520128