System Notification Examples

The following example uses the sysNotification method to handle system notifications subscribed to by application objects.

sysNotification(eventType: Integer; theObject: Object; eventTag: Integer)
                updating;
begin
    if eventType = Object_Create_Event then         // new product
        self.loadTable;
    endif;
end;

The following example, from the Erewhon Investments example schema supplied on the JADE release medium, shows a sysNotify method that registers the current form to be notified when the nominated event (specified in the eventType parameter) occurs on the requested object.

sysNotify(eventType: Integer;
          theObject: Object;
          eventTag:  Integer) updating;
begin
    app.mousePointer := Busy;
    zSynchronizeForm(eventType, theObject, eventTag, null);
epilog
    app.mousePointer := Idle;
end;