Hi All,
In my application I have a class like this:
from Tkinter import *
class MyClass:
def __init__(self, root):
self.property=value
self.aButton=Button(root, text='Press me!')
self.aButton.bind('<Return>', self.handler)
self.aButton.bind('<KP_Enter>',self.handler)
...
def handler(self,event):
self.aButton.unbind('<Return>')
self.aButton.unbind('<KP_Enter>')
...
localVar=self.property
self.property=newCalculatedValue
...
self.aButton.bind('<Return>', self.handler)
self.aButton.bind('<KP_Enter>',self.handler)
The idea is to prevent a fast user (like my boss) to press repeatedly the
"enter"
key and create havoc with self.property and localVar. But it doesn't work: my
boss manages to start at least twice the handler (which, among other things
creates a Toplevel, so I end up with a messy screen).
How should I proceed?
Thanks for your advices,
Sorin
---------------------------------
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
--
http://mail.python.org/mailman/listinfo/python-list