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