PreviousNextIndex

Subscribe( ) event method

Subscribes an event handler method or procedure to an ABL or .NET class event.

Return type: VOID

Access: PUBLIC

Applies to: ABL or .NET class events

Syntax
[ publisher : ] event-name:Subscribe 
  ( [ subscriber : ] handler-method ) [ NO-ERROR ] 

[ publisher : ] event-name:Subscribe 
  ( [ subscriber-handle , ] handler-procedure ) [ NO-ERROR ] 

[ publisher : ]
event-name
[ subscriber : ] handler-method
[ subscriber-handle , ] handler-procedure
NO-ERROR

The Subscribe( ) method subscribes the specified method or internal procedure to the specified event-name by adding its name to a list of handlers for the event. If you do not specify a publisher, you can only invoke Subscribe(  ) in an ABL class definition and on an ABL or .NET event that the ABL class defines or inherits. Note that you can subscribe the same event handler to two different events as long as the signatures are compatible. However, you can subscribe any given event handler only once to the same event. Each time an event is published, all subscribed event handlers execute once in no guaranteed order.

See also: Publish( ) event method, SUBSCRIBE statement, Unsubscribe( ) event method


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex