tiny bug in Tkinter.py

tnb2d@henson.cs.virginia.edu
Tue, 28 Jun 94 11:19:37 EDT

The top-most widget in a Tk window does not have a master.
The following code barfs at this point becuase of this (this is the
destroy method of the TK class):

def destroy(self):
for c in self.children.values(): c.destroy()
del self.master.children[self._name]
self.tk.call('destroy', self._w)

when the line 'del self.master.children[self._name]' is executed
'self.master' is noe and raises a "TypeError: attribute-less object".
The following fix alleviates the problem:

def destroy(self):
for c in self.children.values(): c.destroy()
if master:
del self.master.children[self._name]
self.tk.call('destroy', self._w)

Now can anyone tell me why my shell is being exited from every time I
exit Python on the way out of a Tkinter application?

-------> Tommy.

"Python, like capitalism and love, eventually co-opts all who
seek to change it <grin>." -- Tim Peters