sysNotify

sysNotify(eventType: Integer;              (Form)
          theObject: Object;
          eventTag:  Integer);

sysNotify(control:   control-type input;   (Control)
          eventType: Integer;
          theObject: Object;
          eventTag:  Integer);

A sysNotify event occurs when it is triggered when a specified event occurs on a JADE system object; for example, a customer object is updated. If a form or control has an attached window, a requested user notification is directed to the userNotify event and a requested system notification to the sysNotify event.

The sysNotify event of a window is invoked when a window notification is detected. Insert code into the sysNotify event to respond to or deal with the notification, so that any required tasks are performed when the event occurs.

The following examples show the use of the sysNotify event.

sysNotify(eventType: Integer; theObject: Object;
          eventTag:  Integer) updating;
    // Update the instance collection as instances of Cat are
    // created and deleted by other users.
    if Cat.hasInstance(theObject) then
        if eventType = Object_Create_Event then
            // This may be a notification from one we have just added!
            if not instanceCollection.includes(theObject) then
                instanceCollection.add(theObject);
            endif;
        elseif eventType = Object_Delete_Event then
            // This may be a notification from one we have just deleted!
            if instanceCollection.includes(theObject) then
                // If the instance on display is about to be deleted, tell
                // the user what is about to happen.  They cannot have
                // changed it yet, as it would have been locked if they had)
                if currentInstance = theObject then
                    app.msgBox('Another process has deleted the instance
                               displayed.' & CrLf & 'This instance will now
                               be removed.', self.name, MsgBox_OK_Only +
                               MsgBox_Information_Icon);
                endif;
                instanceCollection.remove(theObject);
                clearFormFields;
            endif;
        endif;
        showInstanceNumber;
    endif;
end;

sysNotify(eventType: Integer; notifyObject: Object;
          eventTag:  Integer) updating;
begin
    if eventType = Object_Create_Event then      // new fault
        createGraph;
        loadTable;
    endif;
end;

The sysNotify event parameters, described in the following subsections, are listed in the following table.

Parameter Contains …
eventType The type of event received
theObject The object for which the notification is to be received
eventTag An integer value that is received for each notification