I need some help identifying a buffer. In the OpenEdge Development Handbook it states:
SCREEN-VALUE — There is a special screen buffer that holds the displayed values of all
data-representation objects in a frame. This buffer is separate from the underlying database
record buffer for database fields and from the buffer where variable values are held.
I understand the screen & record buffers. It's the 'buffer where variable values are held' that I don't know
about. Does it have a particular name or better yet how can I get access to it ?
Thanks.
Hello,
I am guessing that the text that you include is trying to make a distinction between "field:SCREEN-VALUE" and "INPUT field" as a way to refer to the screen buffer.
I could not find that text in the V9 document that available online (http://communities.progress.com/pcom/docs/DOC-16074).
In 10.2B the documentation has a different organization and the information on the record buffer and screen buffer, which you already know, is in the ABL Essentials book.
I hope this helps.
The "buffer where variable values are held" is internal to the 4GL and does not have a name (in fact, there are more than one of them, but that doesn't really matter). It is like a record buffer but you just access the values using the variable names without using a buffer name.
I'm new to Progress and may be asking the wrong question. Let me be more specific.
I have a screen with 10 fill-in date fields. The fill-in fields are not named with table field names.
I want to use a handle to move dates to and from the screen and a 1 record temp table. I was
able to do the move from the screen to the temp table by looping this statement and using a
date & handle array:
assign ttDates.Dates[iIndex] = hDates[iIndex]:input-value.
But I haven't found an attribute like input-value to move the dates from the temp table
to the fill-in fields. I tried screen-value but that value was not displayed. A simple
assignment statement works fine but required the use of the fill-in field names.
That's why I thought if I cound reference the 'buffer where variable values are held' that
would help.
Thanks again.
Why don't you use the temp-table field names for the fill-in fields?
Check out the INPUT function in the 4GL reference manual.
I guess you should share a bit of your code so we can see what you are
doing. I am having trouble understanding what you did.
This is a simple version of what I'm trying to do. I'm looking for a
way to load a value to fill-in-1 without referring to it's name. As I
tried different ways I commented them out.
DEFINE VARIABLE FILL-IN-1 AS CHARACTER FORMAT "X(8)"
LABEL "Fill 1"
VIEW-AS FILL-IN
SIZE 14 BY 1 NO-UNDO.
DEFINE FRAME DEFAULT-FRAME
FILL-IN-1 AT ROW 7.19 COL 32 WIDGET-ID 2
WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
SIDE-LABELS NO-UNDERLINE THREE-D
AT COL 1 ROW 1
SIZE 80 BY 16 WIDGET-ID 100.
DEFINE VARIABLE TestValue AS CHARACTER.
DEFINE VARIABLE hFill-in-1 AS HANDLE.
TestValue = 'Test-2'.
hFill-in-1 = Fill-in-1:HANDLE.
hFill-in-1:Screen-Value = TestValue.
/* fill-in-1 = INPUT fill-in-1. */ /*Statement Works*/
/* Fill-in-1 = hFill-in-1:SCREEN-VALUE. */ /*Statement Works*/
/* APPLY "ENTRY" TO hFill-in-1. */ /* Blank Value displayed */
DISPLAY Fill-in-1.
MESSAGE "SCREEN-VALUE: " hFill-in-1:SCREEN-VALUE SKIP
"TestValue: " TestValue SKIP
"INPUT-VALUE: " hfill-in-1:INPUT-VALUE SKIP
"Fill-in-1: " Fill-in-1
VIEW-AS ALERT-BOX.
Hello,
The issue/behavior that you are seeing is happening because the frame and fill-in field are not realized (displayed on the screen) at the time that the assignment is performed.
If you make the frame/fill-in field visible, either by using the VIEW statement or the DISPLAY statement, the assignment to SCREEN-VALUE would take effect. (You can also use the @ option in the DISPLAY statement.)
I do not know if this behavior expected (I think that you should be able to assign to the screen-value even if the frame is hidden). You could ask Customer Support on this issue.
I hope this helps.
DEFINE VARIABLE FILL-IN-1 AS CHARACTER FORMAT "X(8)"
LABEL "Fill 1"
VIEW-AS FILL-IN
SIZE 14 BY 1 NO-UNDO.
DEFINE FRAME DEFAULT-FRAME
FILL-IN-1 AT ROW 7.19 COL 32 WIDGET-ID 2
WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
SIDE-LABELS NO-UNDERLINE THREE-D
AT COL 1 ROW 1
SIZE 80 BY 16 WIDGET-ID 100.
DEFINE VARIABLE TestValue AS CHARACTER.
DEFINE VARIABLE hFill-in-1 AS HANDLE.
/*VIEW FRAME DEFAULT-FRAME.*/
DISPLAY Fill-in-1 WITH FRAME DEFAULT-FRAME.
TestValue = 'Test-2'.
hFill-in-1 = Fill-in-1:HANDLE.
/*hFill-in-1:Screen-Value = TestValue. */
MESSAGE "After assign" VIEW-AS ALERT-BOX.
/* DISPLAY TestValue @ FILL-IN-1 WITH FRAME DEFAULT-FRAME. */
/* fill-in-1 = INPUT fill-in-1. */ /*Statement Works*/
/* Fill-in-1 = hFill-in-1:SCREEN-VALUE. */ /*Statement Works*/
/* APPLY "ENTRY" TO hFill-in-1. */ /* Blank Value displayed */
MESSAGE "SCREEN-VALUE: " hFill-in-1:SCREEN-VALUE SKIP
"TestValue: " TestValue SKIP
"INPUT-VALUE: " hfill-in-1:INPUT-VALUE SKIP
"Fill-in-1: " Fill-in-1
VIEW-AS ALERT-BOX.
That helps a greal deal.
Thank you for taking your time to help me understand.