Tk variables problem
Sven Drescher
Sven.Drescher at dlr.de
Wed Feb 2 08:10:50 EST 2000
Hi!
I cannot understand why the following little program doesn't work correct.
It's surely a little problem, but in my program are more situations, where
such an error is raised.
I thought, there isn't a problem, but...
Tanks for hints, what I did wrong.
Sven
e.g.:
#!/usr/.../python
import Tkinter
class test:
def __init__(self):
self._bool=Tkinter.BooleanVar()
self._bool.set(1)
self.display()
def display(self):
print "Hi!"
print "The value is ", self._bool.get()
a=test()
a.hallo()
error:
Variable.__init__(self, master)
self._tk = master.tk
Attribute Error: 'None' object has no attribute 'tk'
...
______________________________________
German Aerospace Research Establishment
e-mail: Sven.Drescher at dlr.de
More information about the Python-list
mailing list