January 2008 Archives
Wednesday January 16, 2008 [12:24:40 AM]
Tcl/Tk8.5 difficulties
With the recent release of Tcl/Tk8.5,
I was eager to update one of my programs (Written in Delphi) that
uses an embedded Tcl/Tk scripting engine (with the Tslc component).
I ran into a few stumbling blocks when attempting to do so. The
update wasn't as seamless as it was when upgrading between
Tcl/Tk8.4.x revisions. A couple of major problems that were
encountered: Windows created through Tk8.5 were unusable, bindings
not triggered, etc.. The other main problem was with using scripts
that made use of Tix, a module that extends functionality of Tk
with better widgets and what not, where they would fail to execute
properly due to color code issues. For the first problem, I found
that by pressing the alt-key, the Tk windows became functional
again (I have no idea why), so in my application, I created a Tcl
command from Tslc, 'pressaltkey' which emulates the key-press of
the alt-key, and called this command through a Tslc eval during the
initialization of Tcl/Tk. For the second problem, it appears that
Tk8.5 doesn't like hexadecimal color values, so I had to edit some
scripts in the Tix library to use color names instead (eg. black).
I only hope that Tcl/Tk8.5 isn't this troublesome between
revisions.