Beginning a Notification
Use the
beginClassNotification(theClass: Class;
transients: Boolean;
eventType: Integer;
responseType: Integer;
eventTag: Integer);
Use the
beginClassesNotification(theClass: Class;
includeSubclasses: Boolean;
transients: Boolean;
eventType: Integer;
responseType: Integer;
eventTag: Integer);
Use the
beginNotification(theObj: Object;
eventType: Integer;
responseType: Integer;
eventTag: Integer);
Use the
The parameters for methods that begin notifications are listed in the following table.
| Parameter | Description |
|---|---|
| eventTag | Identifies a specific notification when you have multiple subscriptions for the same event type. |
| eventType | Specifies the type of event for which the notification is registered. |
| responseType | Specifies the frequency with which the event is notified. |
| theClass | For the |
| includeSubclasses | For the |
| theObj | For the |
| transients | For the |
| theInterface | The interface that defines the appropriate |
Global constants in the
| Global Constant | Integer Value | Description |
|---|---|---|
| Response_Cancel | 1 | Sends a notification when the target notification object receives a matching event and then cancels the notification |
| Response_Continuous | 0 | Sends a notification whenever the target notification object receives a matching event |
| Response_Suspend | 2 | Sends a notification when the target notification object receives a matching event and then suspends notification until users refresh their local copy of the target object from the database |
Global constants in the
| Global Constant | Integer Value | Description |
|---|---|---|
| Any_System_Event | 0 | Object has been created, deleted, or updated |
| Object_Update_Event | 3 | Object has been updated |
| Object_Create_Event | 4 | Object has been created |
| Object_Delete_Event | 6 | Object has been deleted |
Event types in the range 16 through Max_Integer, or #7FFFFFFF (2,147,483,647), are user-definable events. User notifications are sent for any event with an event type in this range.
Global constants in the
| Global Constant | Integer Value |
|---|---|
| Any_User_Event | -1 (to subscribe to all user events) |
| User_Base_Event | 16 |
| User_Max_Event | Max_Integer (#7FFFFFFF, equating to 2147483647) |
The
For example, a
If you want to specify your
beginClassesNotification(currentSchema.getClass('MemberKeyDictionary'),
true, false, Any_System_Event, Response_Continuous, 1);
The following table lists the methods that begin and end matching notification types.
| Method that Registers a Request for an Event Notification | Method that Terminates the Notification |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Alternatively, you can use the
For more details, see the appropriate class under "
