Suppressing Events

If an event occurs, normally an event handler will be triggered. It may, however, sometimes be necessary to dynamically suppress the execution of the event-handler code whenever the event has occurred. For example, if you want to modify the string of an input field control within the change-event handler, you must suppress the change event before modification to avoid an infinite loop because the modification itself triggers a change event.

The event-handler code may look like this:

... 
IF...                                            /* Logical condition criteria 
   #IF-1.SUPPRESS-CHANGE-EVENT := SUPPRESSED     /* Suppress the event 
END-IF 
...

By default, the dialog editor generates code to suppress all events for which no event handler code has been entered. In the dialog editor, you can also suppress an event with the Suppress option in the Events... dialog box.

If you suppress an event, the before-any and after-any events are also suppressed for this event.