Issue 775309: button methods tkButtonDown, etc don't work (original) (raw)

The Tkinter.Button methods tkButtonDown, etc. don't work in Python 2.2.2 or 2.3b2. Sample traceback:

Traceback (most recent call last): File "/usr/local/lib/python2.2/lib-tk/Tkinter.py", line 1300, in call return apply(self.func, args) File "/Users/rowen/PythonRO/RO/Wdg/ScriptWindow.py", line 90, in run exec script in globals, locals File "", line 1, in ? File "/usr/local/lib/python2.2/lib-tk/Tkinter.py", line 1831, in tkButtonDown self.tk.call('tkButtonDown', self._w) TclError: invalid command name "tkButtonDown"

I'm not sure what's going on. I've not even been able to find tkButtonDown in the tcl/tk documentation, though a google search come up with some hits for Tcl/Tk 8.3 so it clearly existed or exists.

Details:

tkButtonDown and co. are long gone, you shouldn't be relying on them. If you get tk sources, you will see that tkButtonDown is called when you do btn.event_generate('<1>').

The best thing to do here is actually remove these methods that call commands that shouldn't be used anymore and are not directly available.