in reply to Tk before destroy event
Not sure what you mean by OnDestroy. The standard way of doing this is to bind a <Destroy> event on a passive widget (such as a label) on your main window. Don't bind the main window itself, as all subwidgets will inherit the binding; that way leads to much confusion and many bugs.
If you don't mind the cleanup happening after the main window is destroyed, you can always put the cleanup code after MainLoop, so it won't get called until MainLoop returns.
--
Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tk before destroy event
by fluffyvoidwarrior (Monk) on Jan 25, 2006 at 12:28 UTC |