Roger Chaplin wrote:
[clip]
> 
> IMHO you are trying to solve the wrong problem. Why not test the fields
> and throw up the alert *before* you dismiss the dialog? That's the way
> I do it; the only time the OK button really dismisses the dialog is
> when all fields/controls/whatever have valid values/states.

OK, I'll bite. I'm open to any approach. It's not obvious to me how to go
forward with it though.

I have 10 fields on the form that are editable. I'm not sure what I'd look for
in the way of an event when the user is "finished" editing a field.

If a field currently contains the number 14, and the user changes it to 140,
it's an out of range number in that particular field. How do I know when he's
finished editing the field so I can check it? 120 is a legal number, anything
greater is not. He can certainly add a zero to 14, then change the 4 to a 2 and
that would be a perfectly legal editing sequence. He doesn't have to go to any
other field on the form to be finished editing, only to select the OK or Cancel
buttons to exit.

Can I see the OK button press while I'm inside the dialog? Do I need to change
the dialog window to a "standard" form window and install my own event handler
for the window? Can I install an event handler for a dialog window?

Thanks for your comments - though I still think I should be able to drop my own
menu event on the event queue - even if there are other, or better, design options.

-Tim

-- 
Tim Hewitt
Principal Software Engineer
Fairchild Semiconductor

Reply via email to