[Tkinter-discuss] Python 3.2 and binding Mousewheel on Mac
Ned Deily
nad at acm.org
Sun Apr 22 18:02:18 CEST 2012
In article <4F941CF1.9040900 at codebykevin.com>,
Kevin Walzer <kw at codebykevin.com> wrote:
> In order to call this a bug in Tk itself rather than a bug in Tkinter, I
> need someone to put together a Tcl script that reproduces the issue.
> Then I can proceed with investigating how to fix it. That's how we
> proceeded with the text input bug. In this case, however, all evidence
> suggests that the bug occurs at the level of Tkinter/Tk interaction, and
> all evidence also suggests that a workaround or fix can--and, most
> likely should--be implemented on the Python side of the bridge.
As I understand it, Tkinter uses the Tcl C API to add a new command
which is bound to all events of interest; that's how Tkinter gets called
back from Tcl. There are two different interfaces for externaI C
programs to register as commands; Tkinter still uses the older
Tcl_CreateCommand interface. I believe the bug is in how the event
callback is being set up for the mouse_wheel event. It might not be
visible from a Tcl script. One way to attempt to reproduce it would be
to write a simple C program that calls Tcl_CreateCommand to create a new
command and then define a Tcl script that binds mouse_wheel events to it.
http://www.tcl.tk/man/tcl8.5/TclLib/CrtCommand.htm
--
Ned Deily,
nad at acm.org
More information about the Tkinter-discuss
mailing list