Message15755
Logged In: YES
user_id=45365
I did some more investigating, and it turns out that Jim and Benjamin's
analysis of the problem is correct. The distribution that most people install
for MacOSX is a "batteries included" distribution of Tcl/Tk, which includes
lots of optional packages that initialize themselves. Some of these
initializations do a compare of tcl_version to the numeric value 8.3 or so,
thereby coercing tcl_version to a float. I removed all traces of tcl/tk from my
machine and installed a minimal tcl/tk and the problem does not occur.
On Linux everyone apparently installs a bare tcl/tk, but once you install
incrTcl or whatever yourself you will run into the same problem.
As to your (Martin's) statement that _tkinter uses only official Tcl APIs: the
TCL folks disagree with this. The official way to get a float from a tcl object
is using Tcl_GetDoubleFromObj(), not looking at the cached internal value. A
tcl object is a string, and that's all there is. Anything else is optimization.
The question now is really: how important is patch #518625. It apparently
breaks Tcl object semantics, is the added convenience worth it. If it is then
we simply add str() calls around the comparison of tcl_version in Tkinter, but
then we should remember that this same problem will show up in different
guises later. |
|
Date |
User |
Action |
Args |
2007-08-23 14:12:55 | admin | link | issue729317 messages |
2007-08-23 14:12:55 | admin | create | |
|