Tkinter question: WM_DELETE_WINDOW confusion
chedz at yahoo.com
Mon Sep 17 23:26:35 CEST 2001
I have a class that does the following:
def __init__(self, master)
self.window = Toplevel(master)
Simply initializing an instance of the class and then close (kill) the window
doesn't seem to cause cleanup to execute. However, if i do the following
in the interpreter:
>> v = A(Tkinter.Tk())
>> v.window.protocol("WM_DELETE_WINDOW", v.cleanup)
Then cleanup will be called when i close(kill) the window.
I don't know why the former didn't work while the later did. I am quite
puzzled by this. I am using python21 on Windows 2000.
More information about the Python-list