|GUI ScreenIO for Windows|
A field that causes GUI ScreenIO to return an event to your program is called a hot field.
Hot fields return events, the same way as menu selections or pushbuttons, and are handled in exactly the same way. Control will return to your program with an event id which will match an 88 in the copybook.
Hot fields can be useful for filling in data on panels, such as after a user enters a customer account code, the program can fetch the details of that particular account and populate the rest of the fields on the panel. You can also edit data entered in hot fields without the user having to press a key or click a button.
The conditions that cause a hot return vary depending on the type of control, and are specified in the properties for the specific control.
For example, an edit control can be set to return to your program when the user:
There are performance and complexity implications of enabling hot fields, so don't get carried away, since it can make your program needlessly more complex and impact performance as users tab through fields on a panel.
** NOTE: Hot full is not triggered when user has insert mode on, and is typing at other than the end-of-data. This is because insert mode is often used to correct data, which may temporarily allow field contents to exceed the COBOL field length, but the user fully intends to remove characters to compensate for the insertion. Example: Correcting a zipcode from 99801 to 98801 many user will position to the second digit, type and 8, (which would trigger a hot full), and then hit delete to remove the second 9. In this case, hot will not occur because data entry is being done other than at the end-of-data.
Do not depend on hot fields for routine field edits, these are better done in bulk, after the Enter key or some other event is triggered by the user. Avoid editing field at a time mode. Its slow, and makes for overly complex code.
Use Hot fields to retrieve data. Example: after a user enters an account id, or phone number, to "hit" the database to find the corresponding customer records.
Use Hot fields to lock up or unprotect other fields. Example: When user selects a gender (F), a hot exit can lock up opposite gender options, (Mr. Sir).
Also, be aware that when the user enters data in a hot field, the hot event does not happen until the user EXITS the field. (Tabs out, or auto-skips out).
(Exception: Hot-Full is detected as soon as the user fills the last character position, unless insert mode is on). If there is no other destination for the cursor on the screen (because, for example, there is only one unprotected field) then the user can not Exit the field at all, however we will still send a hot event, and programmers must be aware that this has occurred and not send the user back to the only unprotected field without some means of escaping the panel..
Also, if a field is exited is by clicking a button, the button takes precedence, and no hot return will occur.
This because one of our design criteria is that a single action should only trigger one event, and we do not queue up events. One Action = One Event.
There are exceptions to this one-action-one-event rule. For example: If two adjacent fields have hot-leaving and hot-entering enabled, and you tab from one to the other, you will receive one return when you leave the first field, followed by another return when you activate the target field. You'd generally use one or the other, but not both.
We do not recommend excessive or gratuitous use of Hot fields in any case, but for Client/Server applications it is VERY important to keep these to an absolute minimum. GUI ScreenIO is best when Visual Basic tactics are left behind.
|© 2000-2019 Norcom, all rights reserved|