I'm new to Progress & event driven programming. I'm writing one of my first programs with the AppBuilder.
I have an input field that I want to require input into. If nothing is keyed into the field I display an alert box message on the leave field event. This works okay until I attempt to close the window with nothing being keyed into the required field. At that point the alert box message is displayed instead of the window closing. I'm thinking that 2 events were triggered when the I attempted to close the window: the leave field event & the close window event. Is that the case? If so what programming techniques are used to handle such a situation? Thanks for your help.
The problem here is not really the event model, but in trying to control the user. Modern UI programming is all about letting the user do things in whatever order the user wants to do them. Therefore, you don't want to trap the user in the field. Put up an alert. Color the cell. Whatever ... give the user a signal that things are not yet done, but don't tell them that they have to fix it before doing anything else. Get rid of that and your window close problem will go away and you will have happier users.
Thanks Thomas. Your suggestion is helpful.
Thanks for being open minded enough to understand! All too often, the response is, "but, this is what I want to do".