Sujet : Re: Closing a tclkit
De : avl (at) *nospam* logic.at (Andreas Leitgeb)
Groupes : comp.lang.tclDate : 27. Jun 2024, 16:32:43
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <slrnv7r1gq.3gvbf.avl@logic.at>
References : 1
User-Agent : slrn/1.0.3 (Linux)
bind . <Destroy> {
exit
}
Just another note on how this is not a good idea:
The window "." is in the default "bindtags"-list of every
widget, be it a frame, a button, or whatever else.
Any (inner) widget will, upon it's own destroyment receive
this event and, due to "." being in the bindtags, invoke
the "."'s handler for Destroy, thus try to re-exit the
application, which already is in progress of exiting...
The proper solution with
wm protocol ...
is somewhere down this thread.