See the document A Busy Developer's Guide to Tcl/Tk 8.5 [L1 ] by Mark Roseman.

This topic also came up on comp.lang.tcl, initially in this thread [L2 ].

Some of the responses posted include:

  • Read Changes in Tcl/Tk 8.5
  • Scripts that depend on the exact behavior of cursor motion in the text widget may have problems.
  • Scripts that depend on details of font handling may have problems.
  • you're SOL if you're on Mac Classic. :-)
  • if you write scripts (or test suites!) that depend on formats of particular error messages coming from Tcl or Tk, you may have to change them. Various changes have been made to error messages.
  • If you use only tcl.h, tk.h and the exported functions from the stubs table you should be safe. (Ignore if you only code in Tcl, as opposed to Tcl+C.)
  • If you go from 8.4 to 8.5 it should be easy; simply recompile. (Ignore if you only code in Tcl, as opposed to Tcl+C.)
  • If you go from 8.x x <4 to 8.5 you may need to fix some reference to arguments which are not CONST (that changed in 8.4). (see Migration to 8.4: CONSTification ) (Ignore if you only code in Tcl, as opposed to Tcl+C.)
  • If you go from 7.x to 8.5 you can expect more work.
  • If you use tclInt.h or other nonpublic interfaces all bets are off...; try to recompile and see where the compiler bitches. (Ignore if you only code in Tcl, as opposed to Tcl+C.)
  • My very first test failed, trying xtem from http://www.ctan.org/tex-archive/support/xtem_texmenu/xtem/?action=/te ...
I get (when pressing the exit button)

bad variable name "geom(.xtemqd)": upvar won't create a scalar variable that
looks like an array element
     while executing
"global [set var]"
     (procedure "writeVarList2File" line 5)
:
(followed by more text that I won't quote)
:
  • Reply was: This statement used to be "useless": it would have created a variable that is completely unreachable from Tcl code. It is now an error.
  • If you were using the dict as an extension in 8.4, you may want to remove the package require dict since it is now built into 8.5.
  • There have been a number of significant upgrades for dicts in Tcl 8.5.
  • Integer operations no longer wrap around at 2^31 (or whatever value your platform dictates); make use of the int or wide functions, or bit masking, etc. to limit range explicitly if needed.
  • tcl_precision changed - where previously numbers might have displayed as 3.3, under 8.5 they may show as 3.30000000000003 for example. I had to fix this by adding additional trace commands and shadow variables to reformat the numbers. Concerns use with -textvariable and the like. Normally numbers presented to the user should have been explicitly formated anyway. Previously, the default was tcl_precision of 12, but with the expanded floating point functionality, that variable's value now is set to 0.
  • grid behavior changed when the widget is smaller than the container. Tcl 8.5 added the grid anchor command but the 8.5 default is nw while 8.4 behavior was center.
  • Take a look at the entries in the "changes" files (included in the Tcl and Tk source code distributions) that are marked ** POTENTIAL INCOMPATIBILITY **.
  • If you were using the Tile extension in tk 8.4, the functions were moved into the ttk namespace.
  • The autoconf for Tcl requires at least autoconf 2.57 to regenerate Tcl's configure.
  • read obsolete.tcl if you need to make use of ::tk::classic::restore to return to previous widget default widths, etc.
  • According to various reports, MacOS 9, IRIX 4, RISCos, Ultrix and ancient BSD systems are no longer supported by Tcl/Tk starting with 8.5.
  • First impressions with tcl/tk 8.5.0
  • ActiveTcl 8.5 on Unix is built with threads enabled - use of this tclsh starts a base thread, which will cause conflicts if other code within the process uses fork.
  • Text widget now defaults to a fixed-width font (TkFixedFont vs MS Sans Serif)
  • With Tk 8.5, at configuration time, one has to choose either --enable-xft to get anti-aliased fonts or --disable-xft to get the old bitmap fonts. Under the X window system, at least, it is reported that you can only get one or the other. The result is that users may see a different set of fonts being displayed when using a Tk configured for the anti-aliased fonts, unless the machine in use has both bitmap and anti-alias fonts with the same font names. One developer reports that when his application ran under tk 8.5 with xft enabled, his canvas postscript output was no longer printing - because the fonts being selected from the canvas didn't match the fonts on his printer.

  • Code using a list where a string is expected may find that under 8.5, the value that is included now is braced:
$ tclsh8.4
% list #123456
#123456
%^D
$ tclsh8.5
% list #123456
{#123456}
%

While from a Tcl point of view, the two are equivalent, there are coding situations where a string is needed. As always, in Tcl, be certain to specifically use strings and string functions when strings are required, and use list functions and lists where lists are required.

DGP No, they are not equivalent. Tcl 8.4 is buggy. In Tcl 8.5, the bug has been fixed. See TIP 148 [L3 ] for all the details.


Other wiki pages related to Tcl 8.5 differences


LV 2008-08-21 I have had several developers who have been trying to bring up their Tcl 8.4 applications using Tcl 8.5. While the applications are coming up, the number one complaint that I get is that widgets are coming up with different colors. The primary example I have seen is the code sample I added over on iwidgets while trying to figure out a problem in one of the widgets. Besides the problem with the button placement, under Tcl 8.4, the code there comes up with the listbox having a grey background, but under Tk 8.5 it has a white background.

Is there something simple a developer can do to get this behavior reversed, other than changing lots of lines of code to hard code the color?

JH Use tk::classic::restore, although the new defaults are intended to be a strict improvement for modern UI conventions. This is not considered an incompatibility.