Consultor Eletrônico



Kbase P134920: 4GL/ABL: ASSIGN and SET statements and READ-FILE() method fail to read data into an EDITOR widget b
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/27/2008
Status: Verified

SYMPTOM(s):

4GL/ABL: The ASSIGN and SET statements and the READ-FILE() method fail to read data into an EDITOR widget before the EDITOR has been DISPLAYed.

4GL/ABL EDITOR widget SCREEN-VALUE is not assigned to the EDITOR widget using the ASSIGN statement unless the EDITOR is DISPLAYed before executing the ASSIGN statement.

The SET statement fails to store the user entered data into a widget viewed as EDITOR unless the EDITOR is DISPLAYed before executing the SET statement.

The READ-FILE( ) method fails to read the contents of the specified text file into a widget viewed as EDITOR unless the EDITOR is DISPLAYed before invoking the READ-FILE( ) method.

EDITOR was not visible before ENABLE

FACT(s) (Environment):

Issue does not happen in OpenEdge 10.1B and previous versions
Running the following code example returns a blank for the SchedTemp.TempNotes field after the user types some information in the EDITOR widget and presses the OK button:
DEFINE TEMP-TABLE SchedTemp
FIELD TempNotes AS CHARACTER.
DEFINE BUTTON b-OK
AUTO-GO DEFAULT LABEL "&OK" SIZE 10 BY .83.
DEFINE FRAME Dialog-Frame
SchedTemp.TempNotes AT ROW 14.08 COL 31 NO-LABEL VIEW-AS EDITOR SIZE 36 BY 2.21
b-OK AT ROW 17.75 COL 4
WITH VIEW-AS DIALOG-BOX THREE-D.
/* *************************** Trigger Block *************************** */
ON CHOOSE OF b-OK IN FRAME Dialog-Frame DO:
DO WITH FRAME Dialog-Frame:
CREATE SchedTemp.
ASSIGN SchedTemp.TempNotes.
END. /* DO WITH FRAME */
MESSAGE
"SchedTemp.TempNotes = " SchedTemp.TempNotes "~n"
"SchedTemp.TempNotes:SCREEN-VALUE = " SchedTemp.TempNotes:SCREEN-VALUE
VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
APPLY "CLOSE" TO FRAME Dialog-Frame.
END. /* ON CHOOSE */
/* *************************** Main Block *************************** */
ENABLE SchedTemp.TempNotes b-OK WITH FRAME Dialog-Frame.
VIEW FRAME Dialog-Frame.
WAIT-FOR CLOSE OF FRAME Dialog-Frame.
QUIT.
OpenEdge 10.1C01 Service Pack
All Supported Operating Systems

CAUSE:

Bug# OE00172287

FIX:

Upgrade to OpenEdge 10.1C02 or later.
If upgrading to OpenEdge 10.1C02 or later is not feasible, then a workaround is to DISPLAY the EDITOR before executing the ASSIGN statement. For example:
DISPLAY FieldName WITH FRAME FrameName.
ASSIGN FieldName = FieldName:SCREEN-VALUE.
Another workaround is to explicitly ASSIGN the EDITOR's SCREEN-VALUE. For example:
ASSIGN FieldName = FieldName:SCREEN-VALUE.
If using the workaround is not feasible, then please contact Progress Technical Support in your region immediately. Technical Support will help you assess the need to install a Hot Fix for this issue on top of OpenEdge 10.1C01, and provide you with the Hot Fix as well.