main logo
Subject: Re: Restrict Textbox Values?
Author: "Rafael Copquin"
Posted: 2003/10/31 07:52:00
 
View Entire Thread
New Search


I am an old Foxer (since 1987). I ALWAYS use valid. That is what it is there
for.

Valid is for validating input. Either you accept the input value or you do
not. Period. If you do, then you go to LostFocus and do whatever you are
supposed to do with the value just entered.

I always use these: Init, when, gotfocus,keypress and valid. Each has its
uses. And they fire in that order. You just have to use them for what they
were built. That is all.

Rafael Copquin


----- Original Message -----
From: "Chuck Urwiler" <chuck At eps-software D.OT com>
To: "ProFox Email List" <profox@leafe.com>
Sent: Thursday, October 30, 2003 3:27 PM
Subject: RE: Restrict Textbox Values?


The Valid event. Bah! <g>

I've always used the LostFocus event for validation, and I've never seen
the use for Valid - except for using it in the Grid control (and its
contained controls.

Since you brought it up, can you give me one good reason why you think
Valid is better than LostFocus? To me LostFocus is more consistent than
Valid, in that LostFocus means what it says, while Valid is a little
more obscure (unless you've been programming in Fox since before VFP),
particularly betweeen different controls. In both cases you can prevent
the user from leaving the control (valid, return 0; lostfocus,
nodefault)...

-Chuck Urwiler, MCSD, MCDBA
http://www.eps-software.com


> -----Original Message-----
> From: profox-bounces At leafe D.OT com
> [mailto:profox-bounces@leafe.com] On Behalf Of Juergen Wondzinski
> Sent: Thursday, October 30, 2003 12:55 PM
> To: 'ProFox Email List'
> Subject: RE: Restrict Textbox Values?
>
> The other way would be the VALID event (@Chuck: not the LostFocus!)
<snip>

[excessive quoting removed by server]


 
©2003 Rafael Copquin
<-- Prior Message New Search Next Message -->