Tcl/Tk 8.0
Release: 8.0.5,
Mar 9, 1999.
If you are using software that requires a particular
Tcl/Tk 8.0 release (e.g., 8.0.4 or 8.0p2) you can probably
do just fine with the 8.0.5 release.
If you need a particular release, please check out our
FTP site.
Related links:
When you download Tcl and Tk you get two programs, wish
and tclsh, supporting script libraries, and on-line reference
documentation. These programs are general purpose platforms for writing
applications with Tcl. Wish includes the graphical user
interface toolkit Tk. The packages are ready to use after installation.
Table of Contents
Platforms Supported
Downloading Binary Releases for Windows and Macintosh
Downloading Source Releases for UNIX, Windows and Macintosh
What's New in Tcl 8.0
What's New in Tk 8.0
Incompatibilities
Patches
License Terms
Platforms Supported
Tcl 8.0 and Tk 8.0 run on most releases of the following operating systems:
- Windows 95
- Windows NT
- Solaris and SunOS
- Linux
- HP-UX
- SGI IRIX
- Digital Unix
- AIX
- SCO Unix
- NetBSD, BSDi, FreeBSD
- Most other Unix-like operating systems
- Macintosh (68K and Power Mac)
Tcl requires the Win32s subsystem on Windows 3.1. If you keep your Tcl1680.DLL from the 8.0p2 distribution you may still be able to use 8.0.3 or later on Windows 3.1, but there is no guarantee that this will continue to work. One cannot even compile this DLL with the current Microsoft compilers.
Downloading Binary Releases for Windows and Macintosh
Pre-compiled releases are available for the following Windows and Macintosh platforms.-
Windows 95 and Windows NT self-extracting installer (tcl805.exe)
The file is a self-extracting executable. It will install
the Tcl and Tk libraries, the
wishandtclshprograms, and documentation. - Macintosh 68K and PowerPC self-extracting installer (mactk8.0.5.sea.hqx). The file is in binhex format, which is understood by Fetch, StuffIt, and many other Mac utilities. The unpacked file is a self-installing executable: double-click on it and it will create a folder containing all that you need to run Tcl and Tk.
Downloading Source Releases for Windows, Macintosh, and UNIX
If you're running on a platform other than the ones listed above, or if you want to make modifications to Tcl and Tk, you'll need to retrieve the source releases. The files listed below correspond to the latest stable release. For access to the very latest source, you can use our Net CVS Repository. The stable source releases are available separately for Tcl and Tk in several different forms:
UNIX Source Releases:
You'll want both Tcl and Tk sources. Choose between compressed tar and gzipped tar format. The ZIP files listed under the Windows sources contain the same information, too.
Compressed Tar Files
Gzip'ed Tar Files
Windows Source Releases:
- Tcl sources for Windows (tcl805.zip) This is identical to the Tcl file listed under UNIX sources, but just in ZIP format instead of compressed tar.
- Tk sources for windows (tk805.zip) This is identical to the Tk file listed under UNIX sources, but just in ZIP format instead of compressed tar.
Macintosh Source Releases:
Download one of the following files:- Macintosh Tcl sources (mactcl-source-8.0.5.sea.hqx) This contains the source for the Tcl language.
- Macintosh Tk sources (mactk-source-8.0.5.sea.hqx) This contains the source for the Tk toolkit.
- Full Macintosh Source and Libraries (mactcltk-full-8.0.5.sea.hqx) This contains the source for both the Tcl language and the Tk Toolkit as well as the binaries and the MoreFiles package which is needed to compile the Tcl language.
These files are in binhex format, which is understood by Fetch, StuffIt, and many other Mac utilities. The unpacked file is a self-installing executable: double-click on it and it will create a folder containing sources files used to build Tcl and Tk.
Installation Notes
When you retrieve one of these files, you'll get a compressed tar file with a name liketcl8.0.5.tar.gz or
tcl8.0.5.tar.Z.
The files are identical except for the technique used to compress
them (.gz files are generally smaller than .Z
files, but gunzip is not bundled with all UNIX versions).
To unpack the distribution, invoke shell commands like the
following, depending on which version of the release you retrieved:
gunzip -c tcl8.0.5.tar.gz | tar xf - zcat tcl8.0.5.tar.Z | tar xf - unzip tcl805.zip
Each of these commands will create a directory named tcl8.0.5,
which includes the sources for all platforms, documentation, and the
script library for Tcl 8.0.5.
To compile and install the distribution,
follow the instructions in the README file in the distribution
directory. Be sure to compile Tcl before Tk, since Tk depends on information
in Tcl.
Tcl and Tk should compile with little or no effort on any platform that runs a UNIX-like operating system and the X Window System. This includes workstations from Sun, HP, IBM, SGI, and DEC, PCs running a number of Unix operating systems such as Solaris, Linux, SCO UNIX, and FreeBSD, plus many other platforms such as Cray and NEC supercomputers. These releases should also compile with little or no effort on Windows and Macintosh platforms.
More Information
- See the comp.lang.tcl newsgroup for more user information.
What's new in Tcl 8.0
The most important changes in Tcl 8.0 are summarized below. See
the README and changes files in the distribution
for more complete information on what has changed, including both feature
changes and bug fixes.
- Bytecode compiler. The core of the Tcl interpreter
has been replaced with an on-the-fly compiler that translates Tcl scripts
to byte codes; a new interpreter then executes the byte codes. In earlier
versions of Tcl, strings were used as a universal representation; in
Tcl 8.0 strings are replaced with
Tcl_Objstructures ("objects") that can hold both a string value and an internal form such as a binary integer or compiled bytecodes. The new objects make it possible to store information in efficient internal forms and avoid the constant translations to and from strings that occurred with the old interpreter. We have not yet converted all of Tcl to take full advantage of the compiler and objects and have not converted any of Tk yet, but even so you should see speedups of 2-3x on many programs and you may see speedups as much as 10-20x in some cases (such as code that manipulates long lists). Future releases should achieve even greater speedups. The compiler introduces only a few minor changes at the level of Tcl scripts, but it introduces many new C APIs for managing objects. See, for example, the manual entriesdoc/*Obj*.3. - Namespaces. There is a new namespace mechanism
based on the implementation by Michael McLennan of Lucent
Technologies. This includes new
namespaceandvariablecommands. There are many new C APIs associated with namespaces, but they will not be exported until Tcl 8.1. - Binary I/O. The new object system in Tcl 8.0
supports binary strings (internally, strings are counted in addition to
being null terminated). There is a new
binarycommand for inserting and extracting data to/from binary strings. Many commands, such asputs,gets, andread, now operate correctly on binary data. There is a new variabletcl_platform(byteOrder)to identify the native byte order for the current host. - Random numbers. The
exprcommand now contains a random number generator, which can be accessed via therand()andsrand()math functions. - Registry support. A new
registrycommand is available under Windows to access the registry. It is available as a package namedregistry. - Safe-Tcl enhancements. There is a new hidden
command mechanism implemented with the Tcl commands
interp hide,interp expose,interp invokehidden, andinterp hiddenand the C APIsTcl_HideCommandandTcl_ExposeCommand. There is now support for safe packages and extension loading, including new library procedures such assafe::interpCreate(see the manual entry safe.n for details). - HTTP support. There are new library procedures for
doing GET, POST, and HEAD requests via the HTTP/1.0 protocol. See the
manual entry
http.nfor details. - There is a new command
file attributesfor getting and setting things like permissions and owner. There is also a new commandfile nativenamefor getting back the platform-specific name for a particular file. - There is a new
fcopycommand to copy data between channels either in foreground or in the background using file events. This replaces and improves upon the not-so-secret unsupported old commandunsupported0. - There are new library procedures for finding word breaks in strings.
See the manual entry
library.nfor details. - There are new C APIs
Tcl_Finalize(for cleaning up before unloading the Tcl DLL) andTcl_Ungetsfor pushing bytes back into a channel's input buffer. - Serial I/O devices. Tcl now supports serial I/O
devices on Windows and Unix, with a new
fconfigure -modeoption. The Windows driver does not yet support event-driven I/O on serial devices. - The
lsortcommand has new options-dictionaryand-index. The-indexoption allows for very rapid sorting based on an element of a list. - New notifier. The event notifier has been completely rewritten (again). It should now allow Tcl to use an external event loop like Motif's when it is embedded in other applications. No script-level interfaces have changed, but many of the C APIs have.
What's new in Tk 8.0
The most important changes in Tk 8.0 are summarized below. See the
README and changes files in the distribution
for more complete information on what has changed, including both feature
changes and bug fixes.
- Native look and feel. The widgets have been rewritten to provide (nearly?) native look and feel on the Macintosh and PC. Many widgets, including scrollbars, menus, and the button family, are implemented with native platform widgets. Others, such as entries and texts, have been modified to emulate native look and feel. These changes are backwards compatible except that (a) some configuration options are now ignored on some platforms and (b) you must use the new menu mechanism described below to get native look and feel for menus.
- New menus. There is a new interface for creating
menus, where a menubar is implemented as a menu widget instead of a
frame containing menubuttons. The
-menuoption for a toplevel is used to specify the name of the menubar; the menu will be displayed outside the toplevel using different mechanisms on each platform (e.g. on the Macintosh the menu will appear at the top of the screen). See the menu demos in the widget demo for examples. The old style of menus still works, but does not provide native look and feel. Menus have several new features:- New
-columnbreakand-hidemarginoptions make it possible to create multi-column menus. - It is now possible to manipulate the Apple and Help menus on the Macintosh, and the system menu on Windows. It is also possible to have a right justified Help menu on Unix.
- Menus now issue the virtual event
<<MenuSelect>>whenever the current item changes. Applications can use this to generate help messages. - There is a new
-directionoption for menubuttons, which controls where the menu pops up relative to the button.
- New
- New font mechanism. Tk's font support has been
completely reworked:
- Font names need not be nasty X LFDs: more intuitive names like
{Times 12 Bold}can also be used. See the manual entryfont.nfor details. - Font requests always succeed now. If the requested font is not available, Tk finds the closest available font and uses that one.
- Tk now supports named fonts whose precise attributes can be changed dynamically. If a named font is changed, any widget using that font updates itself to reflect the change.
- There is a new command
fontfor creating named fonts and querying various information about fonts. If a named font is changed, any widget using that font updates itself to reflect the change. - There are now officially supported C APIs for measuring and displaying
text. If you use these APIs now, your code will automatically handle
international text when internationalization is added to Tk in a future
release. See the manual entries
MeasureChar.3,TextLayout.3, andFontId.3. - The old C procedures
Tk_GetFontStruct,Tk_NameOfFontStruct, andTk_FreeFontStructhave been replaced with more portable proceduresTk_GetFont,Tk_NameOfFont, andTk_FreeFont.
- Font names need not be nasty X LFDs: more intuitive names like
- Application embedding. It is now possible to embed
one Tcl/Tk application inside another, using the
-containeroption on frame widgets and the-useoption for toplevel widgets or on the command line forwish. Embedding should be fully functional under Unix, but the implementation is incomplete on the Macintosh and PC. - Tcl/Tk logos. The Tcl/Tk logo and the
"Tcl Powered" logo are now freely available. GIF images for them
are available in several sizes in the
imageslibrary subdirectory. Use and enjoy! - Tk now works correctly with Safe-Tcl: it can be loaded into safe
interpreters using
safe::loadTk. - Text widgets now allow images to be embedded directly in the text without using embedded windows. This is more efficient and provides smoother scrolling.
- Buttons have a new
-defaultoption for drawing default rings in a platform-specific manner. - There is a new
gray75bitmap, and thegray25bitmap is now really 25% on (due to an ancient mistake, it had been only 12% on). The Macintosh now supports native bitmaps, including new builtin bitmapsstop,caution, andnote, plus the ability to use bitmaps in the application's resource fork. - The
destroycommand now ignores windows that don't exist instead of generating an error.
Incompatibilities
As suggested by the change in major release number, these releases introduce some incompatibilities that affect scripts written for previous releases. The main source of incompatibilities is the new Tcl compiler. There were several places where the old Tcl semantics introduced complexity or inefficiency into the compiler, so we decided to try a few small changes to the semantics of the language to eliminate the problems. The changes all involve obscure cases that we hope won't affect many people. The incompatibility issues raised by the compiler are described in detail in a separate document.
There are also a few other minor incompatibilities in Tcl 8.0 and Tk 8.0:
- Variable and command names may not include the character sequence
::anymore: this sequence is now used as a namespace separator. - 2-digit years are now parsed differently by the
clockcommand to handle year 2000 issues better (years 00-38 are treated as 2000-2038 instead of 1900-1938). - The variable
tcl_precisionis now shared between interpreters and defaults to 12 digits instead of 6; safe interpreters cannot modifytcl_precision. The new object system in Tcl 8.0 causes floating-to-string conversions (and the associated rounding) to occur much less often than in Tcl 7.6, which can sometimes cause behavioral changes. - The old Macintosh commands
cp,mkdir,mv,rm, andrmdirare no longer supported; all of these features are now available on all platforms via thefilecommand. - The C APIs associated with the notifier have changed substantially.
- The procedures
Tcl_CreateModalTimeoutandTcl_DeleteModalTimeouthave been removed. -
Tcl_CreateFileHandlerandTcl_DeleteFileHandlernow take Unix fd's and are only supported on the Unix platform. - The C APIs for creating channel drivers have changed as part of the
new notifier implementation. The Tcl_File interfaces have been removed.
Tcl_GetChannelFilehas been replaced withTcl_GetChannelHandle.Tcl_MakeFileChannelnow takes a platform-specific file handle. - Font specifications such as
Times 12now interpret the size as points, whereas it used to be pixels (this was actually a bug, since the behavior was documented as points). To get pixels now, use a negative size such asTimes -12. - The
-transientoption for menus is no longer supported. You can achieve the same effect with the-typefield. - In the canvas
coordscommand, polygons now return only the points that were explicitly specified when the polygon was created (they used to return an extra point if the polygon wasn't originally closed). Internally, polygons are still closed automatically for purposes of display and hit detection; the extra point just isn't returned by thecoordscommand. - The photo image mechanism now uses Tcl_Channels instead of FILEs, in order to make it portable. FILEs are no longer used anywhere in Tk.
- The C procedures
Tk_GetFontStruct,Tk_NameOfFontStruct, andTk_FreeFontStructare no longer available. UseTk_GetFont,Tk_NameOfFont, andTk_FreeFontinstead.
Patches
Patches are available to correct several problems discovered in the original releases of Tcl 8.0 and Tk 8.0. As additional bugs are found, more patches will be released. At present, the following patches are available for Tcl 8.0 and Tk 8.0:
- Tcl/Tk 8.0.5, released on March 9, 1999. Click here for a description of the bugs fixed by this patch . Acknowledgements.
- Tcl/Tk 8.0.4, released on November 18, 1998. Click here for a description of the bugs fixed by this patch .
- Tcl/Tk 8.0.3, released on September 3, 1998. Click here for a description of the bugs fixed by this patch .
- Tcl/Tk 8.0p2, released on November 24, 1997. Click here for a description of the bugs fixed by this patch .
- Tcl/Tk 8.0p1, released on November 7, 1997. Click here for a description of the bugs fixed by this patch .
If you are downloading a release for the first time, be sure to get the
highest patch level that is available. If you currently have an older
patch level of Tcl 8.0 and Tk 8.0 installed, you may wish to upgrade
to the most recent patch release. Patch releases should not introduce
any compatibility problems, so it should always be safe to upgrade.
This is the main Tcl Developer Xchange site,
www.tcl-lang.org .
About this Site |
[email protected]
Home |
About Tcl/Tk |
Software |
Core Development |
Community |
Documentation