Consultor Eletrônico



Kbase P168385: Can I publish a .NET event from ABL?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   13/12/2010
Status: Verified

GOAL:

Can I publish a .NET event from ABL?

GOAL:

How to raise a .NET event in 4GL / ABL code

GOAL:

How to fire an event in GUI for .NET

FACT(s) (Environment):

Windows
OpenEdge 10.2x

FIX:

.NET object events cannot be directly published (sent or fired) from ABL. Each .NET object is responsible for publishing its own events, which can then be handled in ABL using event handlers. However, if a .NET object provides protected or public methods for publishing events programmatically on behalf of the object, these methods can also be invoked from ABL to publish the specified events. Protected methods to publish an event are typically called On<EventName> and accept an EventArgs parameter (no sender). The use of these .NET methods in ABL is analogous to using the APPLY statement to publish ABL events "to" a specified widget or handle.
If an abstract .NET event is inherited and implemented in ABL, the event can be published directly in the implementing ABL class using the ABL Publish() event method.