[RFC] tk_messageBox is evil...
Keith Seitz
keiths@cygnus.com
Tue May 15 14:06:00 GMT 2001
Hi,
The following really makes me sad:
$ grep -r tk_messageBox * | wc -l
103
Why? Because tk_messageBox is evil. It is application modal and does not
stay on top of all windows -- only its parent.
I have a basic reimplementation of tk_messageBox which is based on a
Dialog class, which plays nice with ManagedWin. This window is 100%
non-modal, and I think it should be used for all NON-modal dialogs (like
non-fatal errors and warnings).
Right now, it is pretty much the same as tk_messageBox, except that you
have to make your own dialog class. I've done a simple ErrorDialog which
is essentially "tk_messageBox -type ok -icon error -title TITLE -msg MSG",
where you can specify the MSG and TITLE (and icon, too).
Does this sound reasonable? Anyone want to see code? :-)
Keith
More information about the Insight
mailing list