PreviousNextIndex

Publish( ) event method

Publishes an ABL class event defined in the current class definition. Publishing an event causes any event handlers subscribed to the event to execute.

Return type: VOID

Access: PRIVATE

Applies to: ABL class events

Syntax
[ THIS-OBJECT : | class-type-name : ]  
  event-name : Publish ( [ parameter [ , parameter ] ... ] ) [ NO-ERROR ] 

[ THIS-OBJECT : | class-type-name : ]
event-name
( [ parameter [ , parameter ] ... ] )
NO-ERROR

You can only invoke the Publish( ) method on an event from within a class definition that defines and implements the event, regardless of the event’s access mode. (You cannot invoke Publish( ) on an abstract event.) Thus, you can publish the event within any method, constructor, destructor, property accessor, or trigger that is defined within the class that also includes the DEFINE EVENT statement that implements the event.

After the Publish( ) statement executes, the value of the RETURN-VALUE function reflects the last RETURN statement executed (if any) by all event handlers subscribed to event-name. However, because the order of handler execution is not guaranteed, if you subscribe more than one event handler that executes RETURN, you might not know which handler set the value for the RETURN-VALUE function.

See also: PUBLISH statement, Subscribe( ) event method, Unsubscribe( ) event method


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex