Consultor Eletrônico



Kbase 20997: ADM2. Changing the Value of a View-as Text Fill-in in SmartWindow
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

GOAL:

How to change the value of a View-as Text fill-in between SmartWindows.

FACT(s) (Environment):

Progress 9.x

FIX:

Consider the following example:

SmartWindow1:
- Insert a button.
- Trigger in the button:
RUN pp.w (INPUT "AAA").

SmartWindow2 (named pp.w):
- Definition block:
DEFINE INPUT PARAMETER i AS CHAR.
- Insert a fill-in with View-as Text selected.
- Main block:
ASSIGN fill-in-1:SCREEN-VALUE = i.


If you are using normal windows, after pressing the button, the fill-in-1 will change its value. If you are using SmartWindows, the fill-in-1 will not change its value.


SOLUTION 1 (more recommended):

1) Add initializeObject procedure (to get this procedure you have to select new procedure and override).

2) Insert in this procedure after the "RUN SUPER" statement:

ASSIGN fill-in-1:SCREEN-VALUE IN FRAME {&FRAME-NAME}= i.

SOLUTION 2:

SmartWindow2 (named pp.w):

1) Add create-objects procedure (to get this procedure you have to select new procedure and override).

2) Insert in this procedure:
ASSIGN fill-in-1:SCREEN-VALUE = i.

3) Check fill-in-1 properties: display property has to be unchecked.


After pressing the button in SmartWindow1 the fill-in-1 will change its value.