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:
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) :
$ 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.
PWQ 22 Aug 08, So now when I print out a list of four colour names using #rrggbb notation I can always expect the first colour to be braced and then rest unbraced, thanks for that, that is so much better. I am always wanting to eval comments as lists and I never want to use #rrggbb colour names in lists.
DKF: If you want to print as before, just join the list.
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.
LV Is there something I can use so that the classic Tk radiobutton displays a diamond rather than a circle indicator? The Tk 8.5 man page for radiobutton mentions both, but I don't seem to see an option to get the diamond back. A poster on comp.lang.tcl suggested:
create two custom images that mimic the old look, and use those with the radiobuttons. That might be the quickest road to a solution.
The reference in radiobutton.n to diamond was a red herring to me. Thanks to all.
LV When using a radiobutton or a checkbutton under X, and specifying -selectcolor, in Tk 8.5.0-5, the -selectcolor value is used regardless of whether the button is selected or not. This color was, previously, used only when the button was selected. Now, when the button is selected, a black dot or checkmark is overlayed on top of the select color.
LV A developer reports to me the following. In Tcl 8.4, he coded (incorrectly):
% proc retsortlist {} { set numlist [list 5 4 3 2 1] lsort -integer numlist return $numlist } % retsortlist 5 4 3 2 1
while in Tcl 8.5, he sees:
% proc retsortlist {} { set numlist [list 5 4 3 2 1] lsort -integer numlist return $numlist } % retsortlist expected integer but got "numlist"
So a developer may find places in code being moved to Tcl 8.5 which now, correctly, indicates an error where before no error was seen.
MG It seems like 8.4 checked for a single-element list (which obviously doesn't require sorting) before it did validation of the list elements. In 8.4
lsort -integer foo
returns foo, but
lsort -integer [list foo bar]
throws the error you'd expect, expected integer but got "foo"
LV 2009 Jul 29 One of the clock scan behaviors changed between 8.4 and 8.5:
$ tclsh8.4 % clock format [clock scan "February 31, 2009"] unable to convert date-time string "February 31, 2009" % ^D $ tclsh8.5 % clock format [clock scan "February 31, 2009"] Tue Mar 03 00:00:00 EST 2009
If your application depended on clock scan to fail to parse certain types of dates, you will need to test that specific dependency, because it probably will not give you the result you were expected.
LV I still have been unable to build BLT against Tcl 8.5.x (where x = 0-7). Are there other, relatively well-known, Tcl packages which do not build against Tcl 8.5 yet?