Tk 4.1b1 Release Announcement February 1, 1996 John Ousterhout Sun Microsystems, Inc. john.ousterhout@eng.sun.com This message is to announce new releases of the Tcl scripting language and the Tk toolkit. The new releases are Tcl 7.5b1 and Tk 4.1b1. These releases contain many new features, which are summarized below. The "b1" in the release names indicates that these are the first "beta" releases. The "beta" means that the releases have all of the features we expect to appear in the final Tcl 7.5 and Tk 4.1 releases, but they are likely to have bugs and we do not promise to maintain backward compatibility between these releases and the eventual Tcl 7.5 and Tk 4.1 releases (we may make changes in new features if we find problems during beta testing). We would like to get the final releases out as quickly as possible, so we'd appreciate rapid feedback on problems with these beta releases. Where to get the new releases: ------------------------------ Tcl 7.5b1 and Tk 4.1b1 are currently available by public FTP from ftp.smli.com in the directory /pub/tcl. The releases should appear on the usual mirror sites within a few days. The following files are available: - tcl7.5b1.tar.gz and tk4.1b1.tar.gz contain the unified source releases for all platforms (there are also .Z and .zip versions of these files). - win41b1.exe contains a binary release for the PC. This file contains compiled versions of Tcl, Tk, tclsh, and wish, along with libraries, demos, and manual pages (but no sources). The file is a self-extracting executable (run it and it installs everything). - PC sources are also available in the "win" subdirectory of the release area. See the README file in that directory for details. - mactk4.1b1.sea.hqx contains a binary release for the Mac. The file is in binhex format, which is understood by Fetch, StuffIt, and other Mac utilities. The unpacked file is a self-installing archive: double-click on it and it will create a folder containing everything you need to run Tcl and Tk. - Macintosh sources are also available in the "mac" subdirectory of the release area. See the README file in that directory for details. For additional information: --------------------------- There is a set of Web pages on Tcl and Tk maintained by the Tcl/Tk group at Sun Laboratories. They can be accessed via the following URL: http://www.sunlabs.com/research/tcl Credits: -------- Although I'm posting this message, most of the new features in this release are due to other people. Credit for the PC port goes to Scott Stanton (scott.stanton@eng.sun.com) and credit for the Macintosh port goes to Ray Johnson (raymond.johnson@eng.sun.com). The new "interp" command and the new I/O system are the handiwork of Jacob Levy (jacob.levy@eng.sun.com). Stephen Uhler (stephen.uhler@eng.sun.com) is responsible for the new "grid" geometry manager. Changes in Tcl 7.5b1: --------------------- Here is a summary of the feature changes in Tcl 7.5b1, relative to Tcl 7.5a2. See the README and "changes" files in the distribution for more details. 1. You can create Tcl and Tk as shared libraries with the --enable-shared switch to the configure script. 2. There is a new "package" command for package and version management. See the manual entries for "package" and "pkg_mkIndex" for details on how to use it. There are also C APIs to the package mechanism; see PkgRequire.3. 3. The "load" command supports statically-linked packages; you can use this feature to add extensions (including Tk) into slave interpreters. 4. The event loop from Tk has been moved to Tcl. Tcl now has commands "after", "fileevent", "update", and "vwait" (which replaces tkwait). The "tkerror" command has been renamed to "bgerror". "Tkerror" is still supported for backwards compatibility, but you should switch ASAP to using "bgerror" instead. Many C procedures that used to be in Tk have been moved to Tcl and renamed, such as Tcl_DoOneEvent, Tcl_DoWhenIdle, Tcl_CreateFileHandler, and Tcl_CreateTimerHandler. 5. Tcl has a whole new I/O system. All of the Tcl commands like "open" and "puts" should continue to operate as before, but there is a totally new implementation that doesn't use the C stdio library: - The new I/O system is more portable, and it can be extended with new kinds of I/O channels; see CrtChannel.3 for details. - Nonblocking I/O is supported on all platforms and there is a new command "fconfigure" to enable it and other channel options; see fconfigure.n for details. There is also a new "fblocked" command. - The I/O system automatically translates between different end-of-line representations (such as CR on Macs and CRLF on PC's) to the newline form used in UNIX and in all Tcl scripts; the "fconfigure" command can be used to control this feature. - There is a set of C APIs for manipulating Tcl_Channel's, which are analogous to UNIX FILE's. The C procedures have roughly the same functionality as the stdio procedures. See OpenFileChnl.3, CrtCloseHdlr.3, and CrtChnlHdlr.3 for details. - There is a new structure Tcl_File which provides platform- independent access to file handles such as UNIX fd's. See GetFile.3 for details. - There are new procedures Tcl_GetErrno and Tcl_SetErrno for accessing the "errno" variable in a safe and portable fashion. See SetErrno.3. 6. File name manipulation has been improved to support different styles of names for different platforms, plus a universal "network file name" that should work everywhere. The "glob" command now works on all platforms. See the manual entries file.n and filename.n for details. 7. There is a new "socket" command for network communication via TCP sockets. It works for both the client and server sides. There is also C-level support for sockets; see OpenTcp.3. 8. There is a new "clock" command, which contains the functionality of the TclX clock-handling commands. 9. The "foreach" command has been generalized to support multiple lists and multiple variables iterating over each list. 10. There is a new procedure Tcl_CreateExitHandler that you can use to make sure a C procedure is called before the Tcl application exits. 11. There is a new procedure Tcl_UpdateLinkedVar to force the Tcl-level variable to be updated after you've changed the corresponding C-level variable. 12. The procedures Tk_Preserve, Tk_Release, and Tk_EventuallyFree have been moved from Tk to Tcl and given names like Tcl_Preserve. Only two backward incompatibilities are introduced by Tcl 7.5b1. These affect C code only; existing scripts for Tcl 7.4 should run unchanged under Tcl 7.5. 1. The procedures Tcl_EnterFile and Tcl_GetOpenFile no longer exist; they are not compatible with the new I/O system, but there are other ways to get the same effect. 2. All of the C APIs for the notifier have changed. See Notifier.3 for details. Changes in Tk 4.1b1: -------------------- Here is a summary of the feature changes in Tk 4.1b1, relative to Tk 4.1a2. See the README and "changes" files in the distribution for more details. 1. There is a new command "grid" that implements a table style of geometry management. This will be used by future releases of the SpecTcl GUI builder. 2. The wish main program now supports -visual and -colormap command- line arguments. 3. Text widgets have been improved in several ways: - Performance when there are many tags should be much better now; tags should only be slow if there are a very large number of tags on an individual character. - There are new "dump", "mark next", "mark prev" and "tag prevrange" widget commands for extracting information out of a text widget. 4. Tk is now a first-class Tcl package (in the sense of the new Tcl "package" command). You can load Tk into a slave interpreter "foo" with the command "load {} Tk foo" if Tk is statically linked. Tk can also be compiled as a shared library using the --enable-shared switch for "configure". 5. The event loop has moved to Tcl. Many procedures and #defines have been renamed, such as the "tkerror" command (now "bgerror"), TK_READABLE (now TCL_READABLE), and Tk_DoOneEvent (now Tcl_DoOneEvent). All of the old Tk names are still supported for backwards compatibility but you should switch over ASAP to the new ones. 6. Tk_Preserve, Tk_Release, and Tk_Eventually have been moved to Tcl. There are #defines in tk.h for backward compatibility, but you should switch ASAP to the new Tcl APIs. Although Tk 4.1b1 is compatible with Tk 4.0 and Tk 4.1a1 scripts at the Tcl level, there are two incompatible changes in Tk's C APIs. These will only affect C code, not Tcl/Tk scripts, and they are obscure enough that they probably won't affect many existing extensions. If there are any potential problems, they will be detected by an ANSI-compliant C compiler such as gcc. 1. The procedure Tk_CreateMainWindow no longer exists. Instead, Tk_Init does everything that Tk_CreateMainWindow used to do. 2. The procedures Tk_EventInit and Tk_CreateFileHandler2 have been eliminated. Tk_EventInit is no longer needed since the event loop is always available. Tk_CreateFileHandler doesn't make sense with the new notifier in Tcl, but you can get the same effect with the new "event source" mechanism (see the Notifier.3 manual entry in Tcl).