ON event-listANYWHEREOF widget-listOR event-list OF widget-listANYWHEREtrigger-blockREVERTPERSISTENT RUN procedure( input-parameters )
ON event OF database-objectreferencing-phraseOVERRIDEtrigger-block REVERT
ON key-label key-function
ON "WEB-NOTIFY" ANYWHERE trigger-blockFor a list of valid events for each widget type, see the reference page for that widget type. For information on all user interface events, see the “Handle-based Object Events Reference” section.A comma-separated list of widgets or procedure handles to which the event is applied. See the Widget phrase reference entry for more information on referencing widgets.database-object referencing-phraseThe name of a database table or field to which the event is applied. If you specify a database-object, the event specified must be a database event. You cannot specify a metaschema table or field (a table or field named with an initial underscore) as the database-object.The referencing-phrase is valid only for WRITE and ASSIGN triggers. For WRITE triggers you can specify a name for the record before the WRITE operation and a name for the record after the WRITE operation. This allows you to reference both versions of the record within the trigger. This is the syntax for WRITE trigger:
NEW BUFFER new-record OLD BUFFER old-record
OLD VALUE old-field-nameSpecifies a persistent trigger; that is, a trigger that remains in effect after the current procedure terminates. Normally, a trigger remains in effect only until the procedure or trigger in which it is defined ends. You can specify a persistent trigger only for user-interface events. A persistent trigger must be a procedure specified by procedure. The trigger procedure can take one or more input parameters; it cannot have any output parameters. The parameters of the trigger procedure are evaluated when you define the trigger; they are not re-evaluated when the trigger executes.The label of the key for which you want to define a specific action. See OpenEdge Development: Programming Interfaces for a list of key labels.On UNIX, all of the special ABL keys are defined in the PROTERMCAP file supplied with ABL. If the key for which you are defining an action is not already in PROTERMCAP, you must add a definition for that key. Keys that you can name that do not require a PROTERMCAP definition are CTRL, RETURN, BACKSPACE, TAB, and DEL.In Windows, keys are predefined as described in the handling user input section of OpenEdge Development: Programming Interfaces.The action you want the AVM to take when the user presses the key associated with key-label. The key-function value can be one of the key functions listed in Table 48.
Table 48: The following procedure sets up mappings for GO, HELP, and END and defines CTRL+X to ring the terminal bell:
If event-list includes a MENU-DROP event for a menu or submenu, do not interact with the window manager from within the trigger-block. Doing so causes the window manager to lose control of the system, forcing you to reboot or restart the window manager. Actions to avoid include any window system input/output (I/O) or any lengthy processing, especially in statements that cause process interruptions, such as the PAUSE statement with or without I/O. These also include actions that can generate a warning or error message, forcing window system output. Use the NO-ERROR option on supported statements to help avoid this situation. Otherwise, check valid values, especially for run-time resources like handles, to prevent the AVM from displaying unexpected messages.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |