Page 1 of 1

Refreshing a DCSAY

Posted: Fri Jul 30, 2010 9:01 pm
by GeneB
After using DCSAY to show the value of a variable on screen, I use DCGET to change the value of the variable.
I want the original DCSAY to then show the new value of the variable on the screen.
Below is a stripped down snippet from the code I think should work, but it doesn't.
What is the proper way to make this happen, please.
Thanks in advance. GeneB in Albuquerque.

Code: Select all

@ 0,0 DCTABPAGE oTabPage2  CAPTION "Something" ;
      RELATIVE oTabPage1 PARENT oFrame

   @ 1,1 DCGROUP oGroup4 ;
          PARENT oTabPage2 SIZE 50,20

      @  1,1 DCSAY nGet ;
              PARENT oGroup4 ;
              SAYOBJECT oGet

      @  1,16 DCGET nGet  PICTURE "999999.99" ;
                PARENT oGroup4 ;
                TABSTOP ;
                VALID {|| DC_GetRefresh(oGroup4) }

DCREAD GUI

Re: Refreshing a DCSAY

Posted: Fri Jul 30, 2010 11:37 pm
by Zdeno Bielik
Hi,

try something like this:

bSayGet1 := { || AllTrim( Str( nGet1, 8, 2 ) ) }

@ 1, 1 DCSAY bSayGet1 SAYSIZE 10 OBJECT oGet1 SAYID 'cGet1'

@ 1,12 DCGET nGet1 PICTURE '999999.99' ;
VALID { || YourValid() } ;
LOSTFOCUS { || DC_GetRefresh( GetList, 'cGet1' ) }

HTH
Zdeno

Re: Refreshing a DCSAY

Posted: Sat Jul 31, 2010 5:24 am
by GeneB
Thanks, Zdeno, that works.
I appreciate your help.
GeneB