Consultor Eletrônico



Kbase P3680: A HELP trigger on a frame (with or without the ANYWHERE option) is not working in 9.1D with an SmartObject application
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/11/2002
Solution ID: P3680

FACT(s) (Environment):

Progress 9.1D

SYMPTOM(s):

Using SmartObjects

A HELP trigger attached to a frame (with or without the ANYWHERE option) is not working

CAUSE:

A HELP trigger that is defined in the following manner does not get invoked within the SmartContainer itself:

ON 'HELP':U ANYWHERE
DO:
MESSAGE "HELP ANYWHERE" VIEW-AS ALERT-BOX.
END.

FIX:

The fix for this problem is to change the code as follows:

1) Ensure that the hContainer variable has a valid value prior to the ON statement being invoked. The code to do that is as follows:

DEFINE VARIABLE hContainer as HANDLE NO-UNDO.

ASSIGN hContainer = DYNAMIC-FUNCTION('getContainerHandle':U).
IF hContainer:TYPE ='WINDOW' THEN
   ASSIGN hContainer = hContainer:FIRST-CHILD.

2) Change the ON statement so that it refers to the hContainer variable. The code change is as follows:

ON 'HELP':U OF hContainer ANYWHERE
DO:
    MESSAGE "HELP ANYWHERE" VIEW-AS ALERT-BOX.
END.