Subscribe and unsubscribe event handlers
- Last Updated: August 17, 2021
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
In the subscriber class, you subscribe to an event specifying the event handler that will execute when the event occurs. You also need to write a method to handle the event.
Here is the syntax to subscribe to a class event:
publisher:Event Name :subscribe(handler-method).
|
Syntax Element |
Description |
|
publisher |
The class where the event is defined and published. |
|
handler-method |
The name of the method that will execute when the event is published. |
You can also unsubscribe to an event. Here is the syntax to unsubscribe to a class event:
publisher:Event-Name:unsubscribe.
For more information, see Subscribe( ) event method and Unsubscribe( ) event method.