Consultor Eletrônico



Kbase P120644: 4GL: Error (4057) on pressing the GO key after selecting a COMBO-BOX element.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   22/11/2006
Status: Unverified

SYMPTOM(s):

**Attribute <attribute> for the <widget id> has an invalid value of <integer>. (4057)

**Attribute SCREEN-VALUE for the COMBO-BOX cbName has an invalid value of 4. (4057)

Error occurs on choosing the GO key (F1 in CHUI, F2 in GUI) after selecting the last item of the COMBO-BOX when running the following code:
DEF VAR cbName AS CHAR FORMAT "x(10)" VIEW-AS COMBO-BOX LIST-ITEMS "City,State","Zip Code","Cust# Code" NO-UNDO.
DEF FRAME fName
cbName
WITH SIDE-LABELS CENTERED.
REPEAT:
UPDATE cbName NO-LABEL WITH FRAME fName.
END.

CAUSE:

The COMBO-BOX gets confused because one of the elements contains the comma which is the default delimiter for the combo box.

FIX:

Change the delimiter to some other character. For example, the following code changes the default delimiter of the COMBO-BOX to CHR(1):
DEF VAR cbName AS CHAR FORMAT "x(10)" VIEW-AS COMBO-BOX LIST-ITEMS "City,State","Zip Code","Cust# Code" NO-UNDO.
DEF FRAME fName
cbName
WITH SIDE-LABELS CENTERED.
cbName:DELIMITER = CHR(1).
REPEAT:
UPDATE cbName NO-LABEL WITH FRAME fName.
END.