Consultor Eletrônico



Kbase P131113: 4GL/ABL:  How to write a 4GL trigger for multiple widgets and multiple events?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/1/2008
Status: Unverified

GOAL:

4GL/ABL: How to write a 4GL trigger for multiple widgets and multiple events?

GOAL:

How to write a 4GL trigger for a widget list?

GOAL:

How to write a 4GL trigger for an event list?

GOAL:

What is the syntax of the 4GL ON statement used when creating a trigger for multiple events or multiple widgets?

FACT(s) (Environment):

All Supported Operating Systems
Progress 8.x
Progress 9.x
OpenEdge 10.x

FIX:

To write a 4GL trigger for a widget list, use the 4GL ON statement syntax with a comma separated list of the widgets. For example, the following code defines an 'ENTRY' event trigger for three FILL-IN widgets:
ON 'Entry':U OF FILL-IN-1,FILL-IN-2, FILL-IN-3
DO:
MESSAGE SELF:NAME
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.
To write a 4GL trigger for an event list, use the 4GL ON statement syntax with a comma separated list of the events. For example, the following code defines a 'BACKSPACE', 'ENTRY', and 'VALUE-CHANGED' events trigger for three FILL-IN widgets:
ON 'BACKSPACE':U , 'ENTRY':U, 'VALUE-CHANGED':U OF FILL-IN-1,FILL-IN-2, FILL-IN-3
DO:
MESSAGE SELF:NAME
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.
The above two sample triggers demonstrate that the syntax of the ON statement is essentially the same for defining 4GL triggers for one or multiple widgets/events. We simply replace the one widget/event with a comma separated list of the multiple widgets/events.