|Navigation: Language Reference > App B - Events >====== Modal Events ======|
The following Events must always be treated as “modal”:
Also, if a list box has the IMM attribute
When we refer to an event as “modal”, it means that until the event is completed the runtime library can't continue its normal work. The main rule for writing code that responds to these events is that the event must be completed within a “finite” period of time.
This means that the code you write for handling “modal” events should not invoke dialogs, include inner ACCEPT loops, call Message Boxes, or anything similar that would prevent the ACCEPT loop from completing the processing of the event. When your program needs to do something like this upon processing one of these events, a custom event should be posted to the front of the event queue. For example:
POST(MyGainFocus,,, TRUE) !Post a user defined event to handle GainFocus action
<;perform actions for gaining focus>