7.32.2 DEFINE_EVT Examples

This command defines an event called ADRESSCHANGED in a form:

define_evt name(ADDRESSCHANGED) help('This event tells that the #ADDRESS1 field on this form has changed.')

The form also contains a SIGNAL command which triggers this event when the contents of the #ADDRESS1 field on the form are changed:

EVTROUTINE HANDLING(#address1.changed)

   signal event(ADDRESSCHANGED)


In this way the form where these commands have been specified can communicate to an owner form that the contents of the #ADDRESS field on it have changed. An owner form can react to this event by having an event routine for it:


   execute RfrshDtls


See also 7.33.2 DEFINE_MAP with DEFINE_EVT.