ABL allows you to subscribe or unsubscribe a class-based method or internal procedure as an event handler for a given .NET event using the same mechanism it uses for ABL class events.
This is an overview of the ABL syntax to manage event handler subscriptions to .NET events:
You use the following ABL built-in event methods to manage event handler subscriptions:
Subscribe( ) — Subscribes the specified method (handler-method) or internal procedure (handler-procedure) as a handler for the .NET event specified by event-name
Unsubscribe( ) — Removes the specified method or internal procedure as a handler for the .NET event specified by event-name
When you call these event methods, the optional publisher identifies the .NET class or class instance that publishes the specified static or instance event, the optional subscriber is the ABL class or class instance that defines the specified static or instance method, and the optional subscriber-handle is a handle to an external procedure that defines the specified internal procedure. You need these options only if the class or procedure context where you invoke Subscribe( ) or Unsubscribe( ) does not resolve the specified element. Note that even though handler-method is for handling a .NET event, the handler cannot be a .NET method; it can only be an ABL class method.
Otherwise, this syntax works the same way for .NET events as it does for ABL class events. For more information, see the sections on subscribing to ABL class events in OpenEdge Development: Object-oriented Programming.
For a complete description of these event methods for managing both ABL class and .NET events, see the reference entries for the Subscribe( ) method and the Unsubscribe( ) method in OpenEdge Development: ABL Reference.