Re: catch 22
- Posted by Irv Mullins <irvm at ellijay.com> Aug 16, 2001
- 382 views
On Thursday 16 August 2001 10:53, George Walters wrote: > > I have onLostFocus set in order to edit an input field when tab'ed away > from or mous'ed away from. I also have an 'abort' button if the user gives > up on the screen. The problem is that the onLostFocus event gets processed > before the button press and my program tries to edit the left field. So I > guess i'd like to get the button press event before any other events. Is > this possible? Or how can I handle this? I think Derek mentioned this earlier, but I'll put it in my own words: Since in Windows (or other GUI) the user can enter data in whatever order they like, validating an entry at the time of entry is a bad idea. Validation and/or rollback should be done on completion of the entire form (screen) at the time the user clicks the "OK" or "Cancel" button. Trying to validate one field when the contents of the other fields can be changed is fruitless. In addition, it is generally a poor idea to have much validation going on, anyway. The normal "windows way" is to, whenever possible, limit the user to only those options that are valid, thru drop-down menus, checkboxes, radio button choices, calendars, etc. Regards, Irv.