Consultor Eletrônico



Kbase P34987: Cursor is not correctly positioned after LAST-KEY (or equiva
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/24/2004
Status: Unverified

SYMPTOM(s):

Cursor is not correctly positioned after LAST-KEY (or equivalent) is applied to a fill-in

Applying entry to fill-in, then assigning the value of the last key pressed to the value of the fill-in

Code-sample from ANY-PRINTABLE trigger:

APPLY "entry" TO <fill-in-name>.
APPLY LAST-KEY TO <fill-in-name>.

Fill-in is defined with datatype INTEGER

Cursor is positioned to the left of the value

Subsequent key presses causes the value assigned with LAST-KEY to be overwritten

If fill-in is defined with datatype CHARACTER, cursor is positioned on the right of the value

CAUSE:

The exact cause is unknown at the time of this writing

FIX:

Use the following workaround to position the cursor correctly on the right of the value:

APPLY "entry" TO <fill-in-name>.
APPLY "end" TO <fill-in-name>.
APPLY LAST-KEY TO <fill-in-name>.


When working with fill-ins that have the DISABLE-AUTO-ZAP attribute set, apply code similar to the following:

APPLY "entry" TO <fill-in-name>.
<fill-in-name>:SCREEN-VALUE = <fill-in-name>:SCREEN-VALUE + CHR(LASTKEY).
APPLY "end" TO <fill-in-name>.