Kbase P23550: Triggers for keyboard events disable default behavior of the
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/17/2003 |
|
Status: Unverified
SYMPTOM(s):
Triggers for keyboard events disable default behavior of the key
After defining a keybord event, the default behavior of the key could not be used anymore.
CAUSE:
If you write trigger code for keyboard events within a widget,
such as ON CURSOR-UP or ON CURSOR-DOWN, you will find that the default
behaviors typically associated with these keys no longer happen when
the triggers fire.
This is a known property of PROGRESS's event management. If a
hardware event is "trapped" by trigger code in an application, once
the client grabs the event it is no longer passed along to the host
environment. In this case, it means that the cursor key events are
no longer sent to the editor widget itself. The trigger fires, but
the cursor no longer moves up or down.
This is not a bug.
FIX:
One way to work within the bounds of this behavior is to add 4GL
code as part of the trigger which carries out the default behavior.
For an editor widget and a CURSOR-UP trigger, for example:
ON "CURSOR-UP" OF editor-1 IN FRAME frame-a DO:
MESSAGE "Cursor up" VIEW-AS ALERT-BOX.
editor-1:CURSOR-LINE = editor-1:CURSOR-LINE - 1.
END.