Consultor Eletrônico



Kbase 20307: How to Populate an Editor with More Than 32K of Data?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/2/2008
Status: Unverified

FACT(s) (Environment):

Progress 8.x
Progress 9.x
OpenEdge 10

SYMPTOM(s):

How to Populate an Editor with More Than 32K of Data?

SYSTEM ERROR: stkpush: stack overflow. Increase the -s parameter. (279)

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

Unable to FILL character variable with <number of bytes> bytes. (9309)

CAUSE:

If you try to populate an EDITOR widget with more than 32K of data, you might experience problems even if the LARGE attribute is set to TRUE.

Depending on the method you use to populate the widget, either of the following errors is displayed:

SE: stkpush: stack overflow. Increase the -s parameter. (279)

DITEM is not large enough to hold string. (4043)
Unable to FILL character variable with n bytes. (9309)

The error message (279) can be seen with code such as:
EDITOR-1:SCREEN-VALUE = FILL(FILL("A",80) + CHR(13), 500).

The problem here is related to the FILL() function rather than the EDITOR widget. Progress Version 9.1B and later displays the SE 9309 error if this is the case.

The error message (4043) is displayed when the code is modified to:

DEFINE VARIABLE i AS INTEGER NO-UNDO.
REPEAT i = 1 TO 500:
EDITOR-1:SCREEN-VALUE = EDITOR-1:SCREEN-VALUE +
FILL("A",80) + CHR(13).
END.

FIX:

To populate the EDITOR widget with no more than 32K of data, use the INSERT-STRING() method as shown in the following code:

DEFINE VARIABLE i AS INTEGER NO-UNDO.
REPEAT i = 1 TO 500:
EDITOR-1:INSERT-STRING(FILL("A",80) + CHR(13)).
END.

or

FOR EACH customer NO-LOCK:
EDITOR-1:INSERT-STRING(customer.name + CHR(13)).
END.