Consultor Eletrônico



Kbase P24912: Error 4043 when loading more than 32K in an editor widget.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   14/09/2010
Status: Verified

SYMPTOM(s):

Error 4043 when loading more than 32K in an editor widget.

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

Executing code like:

DEFINE VARIABLE i AS INTEGER NO-UNDO.
DEFINE VARIABLE editor-1 AS CHARACTER NO-UNDO VIEW-AS EDITOR SIZE 50 BY 10.

DISPLAY editor-1.

REPEAT i = 1 TO 500:
EDITOR-1:SCREEN-VALUE = EDITOR-1:SCREEN-VALUE + FILL("A",80) + CHR(13).
END.

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

CAUSE:

The internal structure of the editor widget is not large enough to hold the string of information which is being passed. Although a read only widget may be loaded with more than 32K worth of data, the maximum size of processable data in the editor widget is 32K.

FIX:

To load more than 32K of data in a Progress editor widget use the editor's INSERT-STRING function:

DEFINE VARIABLE i AS INTEGER NO-UNDO.
DEFINE VARIABLE editor-1 AS CHARACTER NO-UNDO VIEW-AS EDITOR SIZE 50 BY 10.

DISPLAY editor-1.

REPEAT i = 1 TO 1000:
EDITOR-1:INSERT-STRING( FILL("A",80) + CHR(13)).
END.

note: The above error will be generated if any attempt is made to manipulate the editor in a way that requires progress to put it in its internal structure.