tkinter woes

Rich Neitzel (thor@ymir.atd.ucar.EDU)
Fri, 17 Jun 1994 18:29:52 -0600

Well, I downloaded and built the latest version of Tkinter. After
combing my existing code for 'packing', I ran into this problem - Tk
is bouncing my commands. For example, I have a class that contains a
Label object named self.banner. During initialization everything goes
fine. However, if I call a class method later to alter somethinge I get
errors like this:

Traceback (innermost last):
File "Browser.py", line 288
test()
File "Browser.py", line 283
t.setBanner('File Browser')
File "Browser.py", line 183
self.banner['text'] = name
File "./Tkinter.py", line 332
Widget.config(self, {key: value})
File "./Tkinter.py", line 324
apply(self.tk.call, (self.pathName, 'configure')
File "./Tkinter.py", line 336
self.tk.call('destroy', self.pathName)
File "./Tkinter.py", line 336
self.tk.call('destroy', self.pathName)
File "./Tkinter.py", line 336
self.tk.call('destroy', self.pathName)
File "./Tkinter.py", line 336
self.tk.call('destroy', self.pathName)
File "./Tkinter.py", line 336
self.tk.call('destroy', self.pathName)
TclError: invalid command name ".1446200.1040224.1040296.1156296"

Ditto for deleteing from a Listbox and so forth. What puzzles me is
that the test files distributed with Tkinter work using similar
constructs. Worse, investigation shows that in the class constructor
all parents know their children, but in the method only the toplevel
knows its children. How could the lower level children get 'lost'?

Any ideas what's happening?

Richard Neitzel thor@ymir.atd.ucar.edu Torren med sitt skjegg
National Center For Atmospheric Research lokkar borni under sole-vegg
Box 3000 Boulder, CO 80307-3000 Gjx'i med sitt shinn
303-497-2057 jagar borni inn.