Re: InteractiveChange and ProgrammaticChange Oddness

Author: Ken Dibble

Posted: 2016-06-16 at 09:15:40

>>I don't get why you are checking using the interactivechange method.

>>This fires for every character you type in the control. If you

>>want to check a date I would use the Valid() or lostfocus() methods

>>so you can check the whole date not a half entered date. I only

>>use the interactivechange method when doing searches where you want

>>to display partial matches.

>

>LostFocus() does not fire unless and until something else gets

>focus. There are actions the user can take that result in nothing

>having focus, so LostFocus() is not a reliable place to validate

>user-entered contents of controls.

>

>My memory is more dim regarding Valid(), but I believe I

>experimented with it and could not get it to work the way I wanted.

>Perhaps I was trying to display a MessageBox concerning the user's

>entry and it would only display a WAIT WINDOW or something. I don't

>know, but that decision was made long ago.

Okay, that was imprecise.

My code isn't validating user data, it's ensuring that the contents

of two properties of the control will always be exactly the same. So

intuitively, the place to do that is InteractiveChange().

My reason for not using LostFocus() is actually because the code must

fire in 100% of cases of user interaction with the GUI, including

cases when nothing gets focus.

In addition to the fact that long ago I couldn't get Valid() to work

the way I expected and therefore simply stopped trying to use it,

since I'm not validating user data in this case, intuitively, Valid()

is not the place for that code. More practically, I don't need a

return value from the code, nor do I want to condition ability to

move to another control on the results of that code.

Ken Dibble

www.stic-cil.org

_______________________________________________

Post Messages to: ProFox@leafe.com

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/6C.85.09039.404B2675@cdptpa-oedge02

** 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.

©2016 Ken Dibble