Consultor Eletrônico



Kbase P20222: GPF and errors 4043 and 5442 with combo box.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/3/2010
Status: Unverified

SYMPTOM(s):

GPF and errors 4043 and 5442 with combo box.

DITEM is not large enough to hold string. (4043)

Invalid datatype for argument to method <name>. Expecting <name> (5442)

When running code that creates a Combo box and then adds entries to it, various errors can be reproduced depending on the exact code. For example:

1: GPF Code:
DEFINE VARIABLE cb AS DATE FORMAT "9999-99-99" VIEW-AS COMBO-BOX.
DO WITH FRAME x:
DEFINE VARIABLE h AS HANDLE NO-UNDO.
DISP cb.
FIND FIRST order.
h = BUFFER order:BUFFER-FIELD('ship-date').
cb:ADD-LAST(h:BUFFER-VALUE).
WAIT-FOR "CLOSE" OF THIS-PROCEDURE.
END.

2: Error 4043 Code:
DEFINE VARIABLE cb AS DATE FORMAT "9999-99-99" VIEW-AS COMBO-BOX.
DO WITH FRAME x:
DISP cb.
FIND FIRST order.
cb:ADD-LAST(BUFFER order:BUFFER-FIELD('ship-date'):BUFFER-VALUE).
WAIT-FOR "CLOSE" OF THIS-PROCEDURE.
END.

3: Error 5442 code:
DEFINE VARIABLE cb AS DATE FORMAT "9999-99-99" VIEW-AS COMBO-BOX.
DO WITH FRAME x:
DISP cb.
FIND FIRST order.
cb:ADD-LAST(order.ship-date).
WAIT-FOR "CLOSE" OF THIS-PROCEDURE.
END.

These problems can be reproduced in 9.1D03.

FACT(s) (Environment):

Progress 9.1D

CAUSE:

The exact cause is unknown at the time of this writing

FIX:

The GPF and 4043 errors have been corrected in 9.1D05 and the 5442 error is because the combo box only accepts character data types. Use the string function to convert the order.ship-date to a string and this resolves the 5442 error, e.g.

cb:ADD-LAST(string(order.ship-date)).