Progress
Language Reference
UNSUBSCRIBE Statement
Cancels a subscription to a Progress named event. Specifically, the UNSUBSCRIBE statement cancels one or more subscriptions to one or more named events.
NOTE: Progress named events are completely different from the key function, mouse, widget, and direct manipulation events, which are described in the “Events Reference” chapter in this manual. For more information on Progress named events, see the Progress Programming Handbook .SYNTAX
PROCEDURE subscriber-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, set subscriber-handle to the procedure handle of B.
If the PROCEDURE option does not appear, Progress assumes that the subscriber is THIS-PROCEDURE, the procedure that contains the UNSUBSCRIBE statement,
event-name
A quoted string or character expression representing the name of a named event.
ALL
Cancels all subscriptions.
IN publisher-handle
A procedure handle representing the publisher of a named event.
If the IN option appears, Progress cancels subscriptions to named events published by publisher-handle-specifically, either all subscriptions (if the ALL option appears), or only subscriptions to event-name (if event-name appears).
If the IN option does not appear, Progress cancels subscriptions regardless of the publisher-specifically, either all subscriptions (if the ALL option appears), or only subscriptions to event-name (if event-name appears).
EXAMPLEFor an example, see the reference entry for the PUBLISH Statement in this book.
NOTES
- When Progress 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:
- Progress executes the UNSUBSCRIBE statement with an implicit NO-ERROR option. That is, if Progress 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 ALSO
PUBLISH Statement, PUBLISHED-EVENTS Attribute, SUBSCRIBE Statement
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |