![]() ![]()
|
UNSUBSCRIBE statement
Cancels a subscription to an ABL named event. Specifically, the UNSUBSCRIBE statement cancels one or more subscriptions to one or more named events.
Note: ABL named events are completely different from the key function, mouse, widget, and direct manipulation events, which are described in the "Handle-based Object Events Reference" section. They are also different from the class events described in the "Class Events Reference" section.Syntax
PROCEDUREsubscriber-handle
A procedure handle representing the subscriber to a named event.The PROCEDURE option lets one procedure cancel a subscription on behalf of another. For example, if you want procedure A to cancel a subscription on behalf of procedure B, setsubscriber-handleto the procedure handle of B.If the PROCEDURE option does not appear, the AVM assumes that the subscriber is THIS-PROCEDURE, the procedure that contains the UNSUBSCRIBE statement.event-nameALLINpublisher-handle
A procedure handle representing the publisher of a named event.If the IN option appears, the AVM cancels subscriptions to named events published bypublisher-handle-specifically, either all subscriptions (if the ALL option appears), or only subscriptions toevent-name(ifevent-nameappears).If the IN option does not appear, the AVM cancels subscriptions regardless of the publisher-specifically, either all subscriptions (if the ALL option appears), or only subscriptions toevent-name(ifevent-nameappears).ExampleFor an example, see the reference entry for the PUBLISH statement.
Notes
- When the AVM executes an UNSUBSCRIBE statement, it cancels a subscription when it finds a match. A match means that the SUBSCRIBE and UNSUBSCRIBE event names match, and that one of the following is true:
- The AVM executes the UNSUBSCRIBE statement with an implicit NO-ERROR option. That is, if the AVM cannot find a match, it does not report an error. To find out what errors, if any, occurred, use the ERROR-STATUS system handle.
- If you create a subscription using SUBSCRIBE ANYWHERE, you cannot cancel the subscription using UNSUBSCRIBE IN.
See alsoPUBLISH statement, PUBLISHED-EVENTS attribute, SUBSCRIBE statement, Unsubscribe( ) event method
![]() |
OpenEdge Release 10.2B
|
![]() ![]()
|