From: ouster@sprite.Berkeley.EDU (John Ousterhout)
Newsgroups: comp.lang.tcl
Subject: New releases:  Tk 3.0 and Tcl 6.5
Date: 17 Dec 1992 22:29:40 GMT
Organization: U.C. Berkeley Sprite Project
Distribution: world
NNTP-Posting-Host: tyranny.berkeley.edu


I have just released new versions of Tk and Tcl.  Tk 3.0 is a major
new release with several incompatibilities (hence the change in
major version number).  It doesn't have a lot of fancy new features
but includes many bug fixes and major structural improvements, such as
overhauls of window manager interactions, grabs, input focussing,
menus, and color management.  Tcl 6.5 is a minor upgrade with no
incompatibilities and only a few new features (this is *not* the 7.0
release;  that is still a month or two away).

The rest of this message consists of two parts:

1. An excerpt from the "README" file for Tk 3.0, which summarizes the
major changes and incompatibilities in the release.

2. An excerpt from the "changes" file for Tcl 6.5, which contains a
complete listing of all the changes to Tcl.

3. The usual catalog of what sources are available and how to retrieve
them.

--------------------------------
1. Summary of changes in Tk 3.0:
--------------------------------

Tk 3.0 is a major new release.  For a complete list of all the changes,
see the tail end of the "changes" file in the distribution.  Here is a
short summary of the most important new user-visible features:

(a) Canvases can now generate Postscript output.  See the "postscript"
    widget command.

(b) Code to deal with the window manager has been overhauled:
    - Tk should now work with virtual-root window managers like tvtwm.
      There is a new C procedure Tk_GetVRootInfo plus new options to the
      "wm" command: "vrootx", "vrooty", "vrootwidth", and "vrootheight".
    - Various bugs having to do with window placement and size changes
      have been fixed.
    - The "wm" command has new options "protocol" (support for window
      manager protocols like WM_DELETE_WINDOW), "client" (support for the
      CLIENT_MACHINE property), "command" (support for the WM_COMMAND
      property), and "overrideredirect" (to allow creation of windows
      with the override-redirect flag on).
    I think I've fixed all known problems related to window managers, so
    please report any suspicious behavior.

(c) Focus management has undergone a major overhaul:
    - Tk watches FocusIn and FocusOut events for focus changes as well
      as Enter and Leave events, so it will work better with explicit-
      focus window managers.
    - Tk generates FocusIn and FocusOut events for the focus window.  The
      old procedural interface (Tk_CreateFocusHandler) is still supported
      (for now), but it is obsolete and shouldn't be used anymore.  The
      model for FocusIn and FocusOut events is different than described
      in the Xlib documentation.  See the "focus" manual entry for details.
    - If there is no input focus, then keyboard events are discarded instead
      of going to the window under the pointer.

(d) The event binding mechanism has been upgraded to support the Mode_switch
    key to support the full ISO character set.  Caps_Lock/Shift_Lock support
    has also been improved to conform with official X specs.

(e) New demo programs have been added:
    tcolor -	Interactive editor for colors, using HSV, RGB, or CMY.
		It can hook up to another application with "send" to
		update the other application as you edit.
    rmt -	Attaches to any other Tk application so you can type
		commands remotely to that application.  You can switch
		between applications dynamically.

(f) Several new features have been added to color management:
    - There is now a notion of "color model", which determines whether
      Tk treats the display as color or mono.  This allows you to force
      mono operation even on a color display.  See the "tk colormodel"
      command and the Tk_GetColorModel and Tk_SetColorModel procedures.
    - Tk deals with colormap exhaustion more gracefully now: it generates
      a warning message and switches over to a mono color model.
    - Support has been added for different visual types.  See procedures
      Tk_SetWindowVisual and Tk_SetWindowColormap, plus macros Tk_Visual,
      Tk_Depth, and Tk_Colormap.  The code for this was contributed by
      Paul MacKerras.

(g) Support for multiple simultaneous displays has been improved.  This
    includes changes to the "grab" command ("grab none" no longer exists;
    use "grab release <window>" instead), plus changes in the C interfaces
    to procedures like Tk_FreeCursor.  There are still problems with
    some of the default widget bindings.

(h) The event-sharing code has been removed from Tk (e.g. there is no longer a
    file tkShare.c) and menus have been modified to use grabs instead, which
    is much cleaner.  The -variable option for menubuttons has been removed,
    as have the "post" and "unpost" widget commands for menubuttons.  The
    procedure tk_menus has been replaced by tk_menuBar, which has a slightly
    different interface.  In addition, the interpretation of the "-command"
    option for cascade menu entries has changed so that the command is
    invoked when the entry is activated, not when it is invoked.

(i) The configuration of the release has been modified slightly:
    - Introductory documents are no longer bundled with the sources.
    - The Makefiles include "install" targets.
    - Manual entries have been renamed to use ".1", ".3", and ".n"
      extensions instead of ".man".
    - Tcl and Tk support TCL_LIBRARY and TK_LIBRARY environment variables,
      which override the compiled-in locations for the library directories.

(j) Tk now has the beginnings of a test suite.  It's woefully inadequate
    right now but I hope it will grow over time.  I'd be delighted to
    receive contributions of additional tests.

(k) Various new or enhanced commands:
    - "winfo exists"
    - "yposition" and "delete" options for menu widget command
    - "-setgrid" option for listboxes
    - multiple (or zero) arguments to "destroy" and the "delete" widget
      command for canvases
    - new "tk" command
    - new options to "grab": "current", "release", "set", "status"

This release also contains a few incompatibilities that will require
changes in existing C code or Tcl scripts (hence the jump in version
number to 3.0).  Most of these changes won't affect most users, but
a few of them (like the first one) are likely to affect lots of scripts.
Below is a complete list of all the incompatibilities:

(a) The procedure "tk_menus" has been replaced by "tk_menuBar", which has
    a slightly different calling sequence.

(b) In canvas and entry widgets the options "cursorBackground",
    "cursorBorderWidth", "cursorOffTime", "cursorOnTime", and "cursorWidth"
    have been renamed to "insertBackground" etc.  In addition, the
    "cursor" index has been renamed to "insert" in both widgets and
    the "cursor" widget command has been renamed to "icursor".  This
    was all done to avoid confusion between the insertion and mouse
    cursors (text widgets already use the "insert" names in anticipation
    of the change).

(c) The procedures Tk_FreeBitmap, Tk_NameOfBitmap, Tk_SizeOfBitmap,
    Tk_FreeCursor, Tk_NameOfCursor, and Tk_FreeGC all require a Display *
    argument so that they will do the right thing when there are windows
    on multiple displays.

(d) The -command option for cascade menu entries is now invoked before
    entry activation rather than before entry invocation.

(e) The command "grab none" no longer exists.  Instead, use "grab release"
    with an explicit window argument.

(f) Menubuttons no longer support the "-variable" option or the "post"
    and "unpost" widget commands.

(g) Window names that start with upper-case letters are now prohibited
    (they never worked very well, since they caused confusion with class
    names).

(h) If there is no official focus window then keystrokes are discarded
    instead of going to the window under the pointer.

(i) Boolean options such as -exportselection are now returned by the
    "configure" widget command as "0" or "1" rather than "true" or
    "false".

(j) The widget classes "RadioButton" and "CheckButton" have been renamed
    "Radiobutton" and "Checkbutton" for consistency.  From now on widget
    class names will have exactly one capital letter.

(k) The "dependents" option to the place command has been renamed "slaves"
    instead, which is more consistent with master/slave terminology used
    in documentation.

------------------------------
2. List of changes in Tcl 6.5:
------------------------------

127. 8/10/92 Changed tclBasic.c so that comment lines can be continued by
putting a backslash before the newline.

128. 8/21/92 Modified "unknown" to allow the source-ing of a file for
an auto-load to trigger other nested auto-loads, as long as there isn't
any recursion on the same command name.

129. 8/25/92 Modified "format" command to allow " " and "+" flags, and
allow flags in any order.

130. 9/14/92 Modified Tcl_ParseVar so that it doesn't actually attempt
to look up the variable if "noEval" mode is in effect in the interpreter
(it just parses the name).  This avoids the errors that used to occur
in statements like "expr {[info exists foo] && $foo}".

131. 9/14/92 Fixed bug in "uplevel" command where it didn't output the
correct error message if a level was specified but no command.

132. 9/14/92 Renamed manual entries to have extensions like .3 and .n,
and added "install" target to Makefile.

133. 9/18/92 Modified "unknown" command to emulate !!, !<num>, and
^<old>^<new> csh history substitutions.

134. 9/21/92 Made the config script cleverer about figuring out which
switches to pass to "nm".

135. 9/23/92 Fixed tclVar.c to be sure to copy flags when growing variables.
Used to forget about traces in progress and make extra recursive calls
on trace procs.

136. 9/28/92 Fixed but in auto_reset where it was unsetting variables
that might not exist.

137. 10/7/92 Changed "parray" library procedure to print any array
accessible to caller, local or global.

138. 10/15/92 Fixed bug where propagation of new environment variable
values among interpreters took N! time if there exist N interpreters.

139. 10/16/92 Changed auto_reset procedure so that it also deletes any
existing procedures that are in the auto_load index (the assumption is
that they should be re-loaded to get the latest vesions).

140. 10/21/92 Fixed bug that caused lists to be incorrectly generated
for elements that contained backslash-newline sequences.

141. 12/9/92 Added support for TCL_LIBRARY environment variable:  use
it as library location if it's present.

142. 12/9/92 Added "info complete" command, Tcl_CommandComplete procedure.

143. 12/16/92 Changed the Makefile to check to make sure "config" has been
run (can't run config directly from the Makefile because it modifies the
Makefile;  thus make has to be run again after running config).

-----------------------------
3. Catalog of Tcl/Tk sources:
-----------------------------

I have left the sources and documentation for the Tcl command
language library, for the Tk toolkit, and for a few Tcl-based
applications in the public FTP area on sprite.berkeley.edu.
All of these files are in the "tcl" subdirectory of the FTP area.
Here is a catalog of what's available.  Most of the files are
compressed tar files ("xxx.tar.Z").  There is some overlap
between the contents of the various packages.

tk3.0.tar.Z -		This is the latest release of the Tk toolkit, released
			in December 1992.  It includes a complete copy of the
			Tcl 6.5 release (the version of Tcl with which it is
			compatible) plus a simple windowing shell called
			"wish".  If you retrieve this file you don't need to
			retrieve Tcl separately.

tcl6.5.tar.Z -		This is the newest release of the Tcl library.
			It became available in December 1992.  This package
			includes only the Tcl library and its documentation,
			plus a simple main program for testing.

tclX6.4c-p1.tar.Z -	Extended Tcl (or NeoSoft Tcl), created by Mark
			Diekhans and Karl Lehenbauer, which adds a number
			of useful facilities to the base Tcl release.
			Among the things in Extended Tcl are a Tcl shell,
			many new commands for things like UNIX kernel
			call access and math library routines, and an
			on-line help facility.  This file is based on Tcl
			6.4 and also works with Tk 2.3.

tclX6.4c-patch1.Z -	A patch file that upgrades the previous release of
			tclX (tclX6.4c.tar.Z) to the more recent release
			(tclX6.4c-p1.tar.Z).

mx.tar.Z -		Sources and documentation for a mouse-based text
			editor (mx) and terminal emulator (tx) based on
			Tcl.  This is a very old release:  it uses an old
			version of Tcl (which is included) and doesn't
			even use Tk;  it uses an ancient toolkit called
			"Sx".  These tools will eventually be replaced
			with new tools based on Tk and the newest Tcl.

mx-2.5.tar.Z - 		Newer version of mx (see above) that uses the
			standard X selection mechanism rather than the
			homegrown mechanism used by previous versions. 
			Version 2.5 is not backwards compatible with 
			previous versions (you can't cut and paste between
			the two). Still uses sx and an old version of 
			Tcl (both of which are included).

book.p1.ps.Z		Compressed Postscript for a draft of the first part
			of an upcoming book on Tcl and Tk to be published in
			1993 by Addison-Wesley.  This part of the book
			describes the Tcl language and how to write scripts
			in it.  About 130 pages in length.

tclUsenix90.ps -	Postscript for a paper on Tcl that appeared in the
			Winter 1990 USENIX Conference.  This paper is also
			included in the Tcl and Tk distributions.

tkUsenix91.ps -		Postscript for a paper on Tk that appeared in the
			Winter 1991 USENIX Conference.  This paper is also
			included in the Tk distribution.

tkF10.ps -		Postscript for Figure 10 of the Tk paper.

talk1.ps -		Postscript for viewgraphs from first of five talks
			in the Tcl tutorial at the 1992 X Conference (the
			same talk was also given at the 1992 USENIX Winter
			Conference).  This talk gives an overview of Tcl
			and Tk.

talk2.ps -		Postscript for viewgraphs from second of five talks
			in the Tcl tutorial at the 1992 X Conference.  This
			talk describes how to write scripts in the Tcl
			language.

talk3.ps -		Postscript for viewgraphs from third of five talks
			in the Tcl tutorial at the 1992 X Conference.  This
			talk describes how to program the Tk toolkit using
			Tcl scripts.

talk4.ps -		Postscript for viewgraphs from fourth of five talks
			in the Tcl tutorial at the 1992 X Conference.  This
			talk describes how to write new Tcl-based applications
			in C.

talk5.ps -		Postscript for viewgraphs from last of five talks
			in the Tcl tutorial at the 1992 X Conference.  This
			talk describes how to write implement widgets in C
			using the Tk library.  This talk uses a simple
			"square" widget as an example;  the code for the
			widget is in tkSquare.c.

tkSquare.c -		Sample code for use in conjunction with talk5.ps.

To retrieve any or all of these packages, use anonymous FTP to
sprite.berkeley.edu (Internet address 128.32.150.27).  Use user
"anonymous"; when asked for a password, type your login name.  Then
retrieve the relevant file(s) with the commands like the following:
		type image (try "type binary" if this command is rejected)
		get tcl6.4.tar.Z
		get tk2.2.tar.Z
		get mx.tar.Z

What you'll get in most cases are compressed tar files;  to get back the
original directory hierarchies, type the commands like the following for
each file you retrieved:
		uncompress tk2.2.tar.Z
		tar xf tk2.2.tar
This will create a directory named tk2.0 with all the source files and
documentation for that release.  There will be a README file in the
tk2.0 subdirectory that tells what to do next.

If you don't have access to Sprite, you can also retrieve some or
all of the above files from other FTP repositories.  Here is a
sampler of machines that store some or all of the Tcl/Tk information,
plus the directories in which to check:

ftp.uu.net:		languages/tcl/*
export.lcs.mit.edu:	contrib/tk*
barkley.berkeley.edu:	tcl/*

The barkley FTP area also contains a number of extensions and contributed
Tcl scripts.

If you cannot use FTP at all, there is a service called "ftpmail"
available from gateekeeper.dec.com:  you can send e-mail to this
machine and it will use FTP to retrieve files for you and send you
the files back again via e-mail.  To find out more about the ftpmail
service, send a message to "ftpmail@gatekeeper.dec.com" whose body
consists of the single line "help".