Creating event subscriptions

Demos

Defining Event Subscriptions and Event Handlers (Part 1)

Note: The OpenEdge Release 10.2B demos have not been updated for OpenEdge Release 11.0. Since 10.2B, OpenEdge Architect has been renamed as Progress Developer Studio for OpenEdge. In addition, OpenEdge Release 11.0 includes some feature enhancements and other changes. Despite the differences between 10.2B and 11.0, the demos are still a useful introduction to Progress Developer Studio for OpenEdge.

A UI control typically recognizes many events, but the application responds only to the ones it subscribes to.

Most controls and forms have a default event. For example, the default for a button control is the Click event, and the default for a form object is the Load event.

When you double-click in either of these ways, the Visual Designer generates the appropriate SUBSCRIBE statement in the source code. It also generates an event-handling method. Progress Developer Studio for OpenEdge automatically opens the class file in the ABL Editor (or switches to it if it is already open) and positions the cursor at the method definition.
Note: If you wish, you can disable the automatic generation of event code at the Visual Designer Preferences page. Select Window > Preferences > Progress OpenEdge > Visual Designer and uncheck the Generate event handler on double-click option.

Unsubscribing to events

To delete an event subscription, simply delete the value (the method name) that appears for the event in the right column of the Events tab in the Properties view.

By default, deleting this event value removes the event-handling method, as well as the event subscription, from the ABL code. If you want to change this behavior so that the method is retained, you can do so either for all events or for specific selected events.

Note: Do not change or delete any other annotations added to the ABL code by the Visual Designer. The line preceding an event-handling method is the only Visual Designer annotation that you should modify.