At 09:51 2013-01-31, Dan Covill <[email protected]> wrote:
On 01/31/13 09:14 AM, Gene Wirchenko wrote:
It sounds like you want your exit button to act like a cancel button.
Well, no. I want some buttons to not trigger validation. Exit is
but one of them. Cancel (if the documentation is correct) only allows
for one such button.
Hi, Gene. Good to hear another voice from the past! Are you still
in the Great White North?
Yes. Kamloops, British Columbia, Canada.
USENET is pretty much dead for the Fox groups that I was
following so I cast about for a Fox discussion group and remembered
ProFox. I dropped ProFox several years ago because of all of the OT
postings. I had gone to the lite version, but the OT posters did not
follow the [OT] convention and Ed did not rein them in. A bit of OT
is not that much of a deal, but the amount then was drowning out the
Fox traffic. I am pleased to see that it is better now.
I'm not sure I understand the problem you're having with
LostFocus(), having to check which control the mouse is in. Are you
using the LostFocus() for the specific control, or are you using the
one for the form itself? We've never touched the form's LostFocus().
Controls.
Why am I checking which control? It is like this:
The user decides to exit (or some other action that should
bypass validation). (If you want to exit a form without saving, it
should not matter whether the value in the current control is valid.)
The user clicks on the, say, Exit button.
Among other things, the data control's LostFocus fires. There,
I check for where the mouse pointer is -- Is it on a bypassing
control? -- and whether the mouse button is down -- Has the button
been pressed? -- and if both are so, I exit the form (or whatever is
required) without having to bother with the validation.
I try to use Valid() as much of the time as possible, but there are
situations when validation may require another form to pick a valid
value, and we fell over the rule that you can't have two Valid()
events on the stack. So we moved those to LostFocus() and all works
pretty well.
That rule is why I am considering switching. I have places
where I do not have control-level validation because of that
rule. Why was it changed to that way anyway? (My understanding is
that VFP 3 did not have it and 5 did.)
Sincerely,
Gene Wirchenko
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/20130131180756.TQKC12851.priv-edmwes26.telusplanet.net@edmwcm02
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.