Implementation of not supported UI-TRIGGERS into Dynamics

Posted by palo on 08-Mar-2004 08:38

Solution for adding of additional TRIGGERS, which are not supported in dynamic viewer and dynamic Container by Progress dynamics.

Solution for fixing of bug http://possenet.progress.com/cgi-bin/issuetrck.cgi/dsp-issue.htm?bugnumber=00005412000

Because this bug is not already solved, it is necessary to implement triggers on widgets in Dynamic Viewer (DynView) manually.

Also according information, which is at the bottom, there is no possible to solve it during creation of Object (createObject), it is necessary to override code, which is solving this bug into initializeObject Procedure

1. Using PERSISTENT RUN proc_name.

UI-TRIGGERS event is possible to implement to custom-superprocedure for dynView overriding initializeObject subsuperprocedure.

SYNTAX:

1st way:

DEFINE VARIABLE hWidget AS (WIDGET-)HANDLE NO-UNDO.

ASSIGN

hWidget = DYNAMIC-FUNCTION('widgetHandle':U IN TARGET-PROCEDURE, INPUT "widget-name":U) NO-ERROR.

IF VALID-HANDLE(hWidget)

ON "TRIGGER-NAME":U OF hWidget PERSISTENT RUN ProcName IN TARGET-PROCEDURE (I/O parameters).

2nd way:

DEFINE VARIABLE hWidget AS HANDLE NO-UNDO.

DEFINE VARIABLE hWidgetTargetProc AS HANDLE NO-UNDO.

RUN locateWidget IN TARGET-PROCEDURE

(INPUT "widget-name":U,

OUTPUT hWidget,

OUTPUT hWidgetTargetProc) NO-ERROR.

IF VALID-HANDLE(hWidget) THEN

ON "TRIGGER-NAME":U OF hWidget PERSISTENT RUN ProcName IN TARGET-PROCEDURE (I/O parameters).

Notes:

This code-block can be placed before RUN SUPER, or behind RUN SUPER.

TRIGGER-NAME - Event Name on current widget (e.g. MOUSE-SELECT-CLICK, MOUSE-SELECT-DBLCLICK, etc.)

ProcName - external or internal procedure of target-procedure (dynView)

widget-name - name of widget within dynView object FORMAT CHARACTER

hWidget - HANDLE of Widget which has to be TRIGGERED

© Pavol Drozd (palo) – Jan 2004, Brain Stars Consulting Group, pavol.drozd@brainstars.sk

All Replies

This thread is closed