Dear ProFox'ers:

My VFP app of over a decade uses Valid for validation. Because VFP does not allow two Valid methods on the call chain, I have had to not have control-level validation on nested forms. I would like to change this.

I understand that some people have used LostFocus instead. How exactly does this work?

I have gotten validation in LostFocus, but to set the focus, I have to defer until the GotFocus of the next control. (I check if a form-level property has a reference to a control (the error control) and, if so, set focus back to that control. I do this on all form controls.)

I do not understand the event sequence that I am getting. If TXTONE is the control for which validation fails and TXTTWO is the next control, the events firing are:
          1) TXTONE GotFocus
          2) TXTONE LostFocus
          3) TXTTWO GotFocus
          4) TXTONE GotFocus
I was expecting to see
          3.5) TXTTWO LostFocus
because of TXTTWO not keeping the focus.  Could someone please explain this?

Are there any other things that I have to watch for using this way of handling validation? (I am remembering now why I went with a button toolbar (to allow exiting a form when the current entry control has an invalid value), but there are probably other traps.)

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/20130130181744.SFPF2487.priv-edmwes24.telusplanet.net@edmwcm03
** 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.

Reply via email to