Consultor Eletrônico



Kbase P63660: Going to next Integer field using Down arrow key affects the
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   22/01/2004
Status: Unverified

SYMPTOM(s):

Going to next Integer field using Down arrow key affects the input behavior in CHUI

The cursor is positioned on the left of a field and so an input of 11 will be take in account as 1100.

The down arrow behavior is different to the TAB one that positions the cursor on the right.

CAUSE:

This is the expected behavior. When you use the Tab key to move to a widget, the widget is in autozap mode. When you start typing its contents are cleared and insert mode is turned on. When you use the arrow keys to move to a widget, autozap mode is not turned on and the insert mode doesn't change (if you're not in insert mode already it won't be turned on).
So when you start typing you're going to usually be in overstrike mode and will type over what is in the fill-in.

FIX:

You can use a workaround by writing triggers that map the down arrow key into the wanted TAB one. For example:

DEFINE VARIABLE xx AS CHARACTER NO-UNDO.
DEFINE VARIABLE xxx AS CHARACTER NO-UNDO.
DEFINE VARIABLE ii AS INTEGER NO-UNDO FORMAT "9999".

FORM
xx NO-LABEL SKIP
xxx NO-LABEL SKIP
ii NO-LABEL WITH FRAME yy.

ON DOWN OF xx IN FRAME yy
DO:
APPLY 'entry' TO ii IN FRAME yy.
RETURN NO-APPLY.
END.

ON DOWN OF xxx IN FRAME yy
DO:
APPLY 'entry' TO ii IN FRAME yy.
RETURN NO-APPLY.
END.

UPDATE xx xxx
ii WITH FRAME yy.