wasm-demo/demo/ermis-f/python_m/cur/0575

53 lines
2.2 KiB
Plaintext

From: dgp at clover.cam.nist.gov (Don Porter)
Date: 13 Apr 1999 10:58:59 -0400
Subject: Help: Tkinter, bad event type
References: <37134F3B.8C583E0@btk.utu.fi>
Message-ID: <7evm3j$217$1@clover.cam.nist.gov>
Content-Length: 1942
X-UID: 575
<Marten.Hedman at btk.utu.fi> wrote:
> I'm running Python 1.5.2c1 under Win NT with SP4 and Tcl/Tk 8.05. When I
> try to run any script that uses Tkinter, even hello.py from the Tkinter
> Life Preserver, I get two identical error messages:
>
> bad event type or keysym "MouseWheel"
> while executing "bind Listbox <MouseWheel> ..." invoked from
> <Tk library path>/listbox.tcl
> ...
> invoked from <Tk library path>/tk.tcl
I've not used Python or Tkinter, but that message appears when a
pre-8.0.4 Tk library tries to evaluate the initialization scripts
distributed with Tk 8.0.4 or later. Can you check the value of
the Tcl variable 'tk_patchLevel' to see for sure that your apps
are using matching versions of the Tk library and the initialization
scripts? Perhaps they're linking to an earlier version of the Tk
shared library which is somewhere on your system? Perhaps there's
an old tk80.dll in your .../Windows/System area?
> I can work around this by editing listbox.tcl and commenting out the
> "bind Listbox <MouseWheel> ..." statement, but I have to do this every
> time I install a new version of Tcl/Tk, and it's annoying.
Rather than comment out, wrap these statements (there's also one
in text.tcl) in code which tests the value of the global variable
tk_patchLevel, and evaluates the MouseWheel binding only if
tk_patchLevel reports that the Tk library 8.0.4 or later is in use.
...but you still have to do that for every new 8.0.x release of
Tk unless you can convince Scriptics to fix this bug. To report
it to them, use their WWW Bug Report Form:
http://www.scriptics.com/support/bugForm.tcl
--
| Don Porter, D.Sc. Mathematical and Computational Sciences Division |
| donald.porter at nist.gov Information Technology Laboratory |
| http://math.nist.gov/mcsd/Staff/DPorter/ NIST |
|______________________________________________________________________|