Kbase P93781: VALUE-CHANGED trigger does not fire as expected for a widget when using mouse
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  19/01/2010 |
|
Status: Verified
SYMPTOM(s):
VALUE-CHANGED trigger does not fire for a widget
Widget being changed is a radio-set, toggle-box, selection-list or slider
Value of widget is changed with mouse click
Value of widget does change on display
INPUT-VALUE and SCREEN-VALUE attributes of widget change
Widget being changed does not have focus
Currently focussed widget has RETURN NO-APPLY statement in ON LEAVE trigger
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
Windows
OpenEdge Category: Language (4GL/ABL)
CAUSE:
This is a limitation in the GUI client.
Due to the way Windows and Progress 4GL handle user interface events, the value of the clicked widget is changed by the OS but the ON VALUE-CHANGED trigger of the clicked widget is discarded when the RETURN NO-APPLY is executed.
FIX:
Workaround:
- Ensure the variable underlying the problematic widget always holds a valid value by setting the INITIAL value.
- Place the VALUE-CHANGED trigger code in a trigger procedure (if not already there).
- Before the RETURN NO-APPLY, compare the INPUT-VALUE of the affected widget with the value of the underlying variable. If these are different, RUN the event procedure directly.
This technique ensures the logic is executed as required without relying on the actual VALUE-CHANGED event for the widget.