Project

General

Profile

OCX Event Procedure Support

In general, there are two ways that events are handled for OCX.

1. For some controls (MS TreeView, or DX Treelist) the event handlers are wrapped in trigger statements, which forward the triggers to the event handlers. The respective widget implementation fires these triggers. See the post-rules in annotation/ocx_conversion.rules, where the wrapper triggers are generated.

2. For the widgets where the OCX methods and properties are not converted as legacy widget methods and attributes, but instead Java calls are emitted directly, the event handlers are also called directly. See the method LogicalTerminal.emitComEvent(), which eventually calls ComServer.emit(). This method assembles the handler name and calls it. The handler name is in the form "<Control Frame Name>.<OCX Name>.<OCX event handler name>".

For the Spreadsheet widget the OCX name is taken from the control frame name if it takes the form "<Control frame name>.<OCX name>". Normally the OCX name comes from the .wrx file, but we don't parse it (yet, see #4438). This is a workaround mechanism to allow to specify the name during conversion.


© 2020 Golden Code Development Corporation. ALL RIGHTS RESERVED.