Tget is not returning orginal value when validation failed

Tget is not returning orginal value when validation failed

Postby RAMESHBABU » Fri Nov 07, 2008 3:19 am

Hi All,

I have a get with validation. When the value entered is not correct,
the get should return the original value back.

But it is not done here.

I had to have a work around for this, saving the orginal value to a
varible and updating the get buffer back with old value when validation
fails.

Is is the original behaviour of FWH or I am making any mistake ?

I am using FWH 8.09.

- Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Postby Daniel Garcia-Gil » Fri Nov 07, 2008 4:19 am

how did you declare get?
did you use for/next?
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Postby RAMESHBABU » Fri Nov 07, 2008 5:58 am

>>how did you declare get?

REDEFINE GET oGet VAR nNumber ID 100 PICT "99999" ;
OF oDlg UPDATE COLORS CLR_BLUE, nRGB(255,255,245) ;
VALID Check_Number(oGet, nNumber)

>>did you use for/next?
No.
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Postby Daniel Garcia-Gil » Fri Nov 07, 2008 12:35 pm

local uVal

.....

REDEFINE GET oGet VAR nNumber ID 100 PICT "99999" ;
OF oDlg UPDATE COLORS CLR_BLUE, nRGB(255,255,245) ;
VALID ( if ( Check_Number(oGet, nNumber), .t., ( nNumber:=uVal, oGet:refresh(), .f. ) ) )

oGet:bGotFocus:={|| uVal := nNumber }

i hope this help you...
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Postby RAMESHBABU » Fri Nov 07, 2008 3:07 pm

Hello mcfox

Let me thank you first for your time you have spent on this thread.

I know this work around trick and I have already implemented it, after having failed to get the expected result comparitively with the clipper behaviour of the validated get.

My regards to you,

- Ramesh babu P
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 62 guests