FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Updating a variable during a GET
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Updating a variable during a GET
Posted: Sat Dec 25, 2010 09:59 PM
Guys:

In this piece of code:
Code (fw): Select all Collapse
 @ 10,45 GET oGets[1] VAR adDates[1]        OF oDlg SIZE 40,10 PIXEL ;
              PICTURE "D" CENTER ;
              VALID EVAL({|| adDates[2] := adDates[1], .T.})
          @ 25,45 GET oGets[2] VAR adDates[2]        OF oDlg SIZE 40,10 PIXEL ;
              PICTURE "D" CENTER
          @ 40,45 GET oGets[3] VAR anRxs[1]          OF oDlg SIZE 25,10 PIXEL ;
              PICTURE "@Z 9999999" VALID anRxs[1] >= 0 RIGHT


When I get to the second GET (adDates[2]) it do not show the updated field. After going to the
third get and going back to the second get (adDates[2]), the field shows the new value.

What I'm doing wrong ?

Thank you.
Posts: 117
Joined: Tue Jan 03, 2006 06:18 PM
Re: Updating a variable during a GET
Posted: Sun Dec 26, 2010 07:40 AM
Dear HunterEC,

Try this :


Code (fw): Select all Collapse
@ 10,45 GET oGets[1] VAR adDates[1]        OF oDlg SIZE 40,10 PIXEL ;
              PICTURE "D" CENTER ;
              VALID  ( adDates[2] := adDates[1] ,;
                       oGets[2]:varget()        ,;
                       oGets[2]:refresh()       ,;
                       .T.                       ;
                     )  
        
        @ 25,45 GET oGets[2] VAR adDates[2]        OF oDlg SIZE 40,10 PIXEL ;
              PICTURE "D" CENTER

        @ 40,45 GET oGets[3] VAR anRxs[1]          OF oDlg SIZE 25,10 PIXEL ;
              PICTURE "@Z 9999999" VALID anRxs[1] >= 0 RIGHT




regards,

Kok
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: Updating a variable during a GET
Posted: Sun Dec 26, 2010 08:08 AM

Kok:

Thank you very much. It worked as expected.

Gustavo

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Updating a variable during a GET
Posted: Wed Dec 29, 2010 06:48 PM

Or, you can use the UPDATE clause on all your GETs.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion