This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[RFC] tk_messageBox is evil...
- To: Insight Maling List <insight at sources dot redhat dot com>
- Subject: [RFC] tk_messageBox is evil...
- From: Keith Seitz <keiths at cygnus dot com>
- Date: Tue, 15 May 2001 14:05:31 -0700 (PDT)
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