Message166494
Noticed this odd behaviour with BooleanVar.get() as well:
class MyCheckbutton(Checkbutton):
def __init__(self, parent, **options):
Checkbutton.__init__(self, parent, **options)
self.var = BooleanVar()
self.configure(indicatoron=False, command=self.cb, variable=self.var)
print(self.var.get) # "<bound method BooleanVar.get of <tkinter.BooleanVar object at 0x245c310>>"
print(self.var.get()) # "0"
def cb(self, *events): # button callback (manual toggle)
print(self.var.get) # <bound method BooleanVar.get of <tkinter.BooleanVar object at 0x245c310>>
print(self.var.get()) # True
Python 3.2.3 (default, May 3 2012, 15:51:42)
[GCC 4.6.3] on linux2 |
|
| Date |
User |
Action |
Args |
| 2012-07-26 16:53:25 | crickert | set | recipients:
+ crickert, terry.reedy, klappnase, mark, gpolo, roger.serwy, asvetlov |
| 2012-07-26 16:53:25 | crickert | set | messageid: <1343321605.83.0.417677588114.issue15133@psf.upfronthosting.co.za> |
| 2012-07-26 16:53:25 | crickert | link | issue15133 messages |
| 2012-07-26 16:53:25 | crickert | create | |
|