Tcl 7.4b1 announcement
Date: 6 Jan 1995 19:41:52 GMT
Sender: ouster@tcl (John Ousterhout)
Note: This is the original Beta1 Release Announcement
htmlised with links added - Errors are probably mine (hops)
I have just released Tcl version 7.4b1, the first beta release of
Tcl version 7.4. It is available now via FTP from
ftp.cs.berkeley.edu .
Latest Beta Archive is
Tcl 7.4 .
This is a minor release with just a few small changes needed by Tk4.0Beta
Most of the changes consist of bug fixes, and there is only one small
(?) incompatibility with Tcl 7.3, which is that Tcl no longer provides
a "main" procedure by default. What used to be main is now called
Tcl_Main, and each application needs to provide a main that calls
Tcl_Main. Typically this is done in the tclAppInit.c file; see the
tclAppInit.c file in the distribution for an example.
Here is a summary of the new features:
- Added new subst command for making $ and [] substitutions on
an strings.
- The array command has several new features:
- get and set commands for conversion between arrays
and strings.
- exists command for checking for array element existence.
- names and size commands now treat a non-existent array
the same as an empty one.
- names takes an optional pattern argument.
- lindex, linsert, lrange, and lreplace
all accept end as an index.
- Expressions support unary +.
- The string command has new wordstart and
wordend options.
- Tcl now exports the procedures Tcl_RegExpCompile, Tcl_RegExpExec,
and Tcl_RegExpRange for C-level access to pattern matching.
- When an error occurs while creating a pipeline with open, it
is returned immediately as the result of the open
rather than being
delayed until the close command.
- regsub now returns a count of the number of matches and
replacements, rather than 0/1.
Tk 4.0b1 announcement
I have just released Tk version 4.0b1, the first beta release of
Tk version 4.0.
It is available now via FTP from
ftp.cs.berkeley.edu .
Latest Beta Archive is
Tk4.0 Beta
This is a truly major release. There are many new features, many
bug fixes, and many other changes. There are about 30 incompatible
changes that affect Tcl scripts and a few more that affect C code.
Even so, not all of the things that were "on the list" made it into
the final release. The most important things that didn't make it
were application embedding and most of the changes planned for
canvases. Apologies to those of you that were waiting specially
for these features. Application embedding will appear soon in a
follow-on release, but I'm not sure when the canvas changes will
happen.
The rest of this message is a summary of what has changed in this
release. For more complete information, refer to the "changes"
file that comes with the release.
List of the most important new features
- All of the widgets have been overhauled. The most important
change is better Motif compliance, including a completely new set of
bindings to match Motif. Text and entry widgets also have a set of
Emacs-like bindings. Some additional changes to widgets:
- All widgets now have a cget widget command, which provides
a simpler way to retrieve the value of a configuration option.
- All widgets have -highlightthickness and -highlightcolor options
for controlling the traversal highlight, and the traversal
highlight is displayed whenever the widget has the input focus.
- Entries support justification and a -show option for (not)
displaying passwords. They will autosize to fit their text
if -width 0 is specified.
- The label/button family of widgets now supports multi-line text
and justification. The -selector option for check and radio
buttons has been replaced with -selectcolor and -indicatoron
options.
- Listboxes support all of the Motif selection modes (e.g. single
and multiple selections, and disjoint selections);
the selection
widget command changed to support this. Listboxes will auto-size
around their contents if -width 0 or
-height 0 is specified,
and they have new see, bbox, and
activate widget commands.
- Scales support real values and a linked variable, and their
bindings are now defined in Tcl instead of being hard-wired
in C. Several of the configuration options have been renamed.
- Scrollbars have a new interface to the controlling widget, which
provides more flexibility than the old style (the old style is
still supported, for compatibility). The behavior of scrollbars
is now defined with Tcl bindings rather than being hard-wired
in C, and there are several new widget commands for scrollbars.
Several of the configuration options have been renamed.
- Menu entries support several new options such as -foreground and
-indication, and tear-off menus have been reimplemented to be
more Motif-like. The procedures tk_menuBar and
tk_bindForTraversal are no longer needed, but they exist as
empty stubs for compatibility.
- Menu buttons have a -indicatoron option for displaying an option
menu indicator. Also, there is built-in support for option menus
and popup menus: see the manual entries for tk_optionMenu and
tk_popup.
- Changes to the binding mechanism:
- One binding triggers now for each binding tag (widget, class,
all, etc.) instead of just one overall.
- A new command, bindtags, provides control over the number
and order of the binding tags for a widget. The default is
class, widget, its toplevel, and all.
- Break and continue have meaning
within binding scripts.
- Extraneous modifiers are now ignored in bindings, as if every
binding had an implicit Any modifier.
- The Meta and Alt modifiers are now computed from the modifier
map instead of being hard-wired to M1 and M2.
- Tk now contains a general-purpose image mechanism, including the
following:
- There is a new command image for creating images.
- Many widgets provide a -image option.
- Canvases contain a new image canvas item type.
- There is built-in support for two kinds of images: bitmaps and
photos. The photo image type was provided by Paul Mackerras and is
based on his photo widget.
It currently supports only PPM-format
images, but can easily be extended to handle other image types
(see the manual entry for Tk_CreatePhotoImageFormat).
- There is an extension mechanism for defining new kinds of images.
See the manual entry for Tk_CreateImageType.
- Text widgets have undergone a major overhaul, including the following:
- They now support embedded windows; read about the window
widget command.
- Many new tag configuration options have been added to support
justification, margins, line spacing, and vertical offsets.
- Added horizontal scrollling.
- Tags have been reimplemented so that they aren't sticky on
either side: a new character gets a tag only if the old
characters on both sides of it were tagged. There is also
an optional tagList argument to the
insert widget command
for specifying tags for new text.
- Marks have gravity to control which way the mark moves when
text is inserted at its position; see the mark gravity
widget command.
- There are several new widget commands: search, bbox,
dlineinfo, and see.
- The end tag now refers to a position just after the final
newline, rather than just before it. You can now tag the newline
and set marks after it.
- Event handling has been improved in several ways:
- Mark Diekhan's addinput command has been incorporated under
the name fileevent.
- After bindings can be cancelled now.
- The event code has been repackaged so that it can be used without
the rest of Tk (see the manual entry for Tk_EventInit).
- There is a new form of file event handler: see the manual entry
for Tk_CreateFileHandler2.
- Changes in the focus mechanism:
- Keyboard traversal of widgets is now built in. See the manual
entry for tk_focusNext.
- Multiple displays are supported via the -displayof option to
focus.
- There is always a focus window now (focus none is no longer
allowable. There is no default focus window; instead, the
focus reverts to top-levels by default.
- Tk keeps track of a separate focus window for each top-level
window and automatically moves the focus there whenever the
window manager gives the focus to a top-level. The default is
to use click-to-focus within a top-level but focus-follows-mouse
between top-levels; however, you can make the focus follow the
mouse within a top-level too; see the manual entry for
tk_focusFollowsMouse.
- Tk no longer synthesizes FocusIn and FocusOut events now; it
just uses the standard X events.
- Changes in the send command:
- Winfo inters no longer returns stale intepreter names.
- Mutliple displays are supported via the -displayof option.
- Asynchronous sends are permitted with the -async switch.
- Timeouts no longer occur, so sends can take as long as you like;
a send won't abort as long as the target application still exists.
- You can change the application's name with tk appname.
- Window server security is checked on each send now.
- More complete error information is propagated back to the caller
now (errorInfo and errorCode variables).
- Selection support has been improved to handle multiple displays
and different kinds of selection (primary, secondary, etc.).
There is special support for the clipboard in the form of a new
clipboard command and procedure Tk_ClipboardClear and
Tk_ClipboardAppend.
- Changes to canvases:
- The interface between generic canvas code and the various canvas
item types has been cleaned up, documented, and officially exported
so that you can define new item types. See the manual entry for
Tk_CreateItemType.
- Bitmap items are now transparent if the -background option is
specified as empty.
- Several bugs relating to Postscript generation and arrowheads
have been fixed.
- Changes to the Wish application:
- The -file keyword is no longer required (but it is still
supported for compatibility): if the first argumen to wish
doesn't start with -, it is assumed to be the name of a
script file, just as for sh.
- It now uses a class name based on the application name, rather
than always using Tk as the class.
- Also, the main program for Tk has been renamed Tk_Main, and
the real main is now part of tkAppInit.c.
- The -help option is no longer supported.
- There is now explicit support in Tk for colormaps and visuals,
including -colormap and -visual options for toplevels and frames,
new commands winfo visualsavailable and wm colormapwindows,
and procedures Tk_GetVisual, Tk_GetColormap, and Tk_FreeColormap.
- Toplevel windows are now resizable by default, and wm
iconwindow should work now (it never really worked before).
- I've patched around the Xlib bug whereby long-lived applications
used to crash because resource ids wrapped around.
- Geometry management has been improved in several ways:
- The -in option should now work correctly in the placer and
packer (it was quirky before).
- You can find out which manager controls a slave with the
winfo manager comamnd.
- The C interfaces to geometry management have been reworked:
see the manual entry for Tk_ManageGeometry.
- There is a new bell command that does what you would expect.
List of incompatibilities
- Conflict resolution in bindings is different: if you have
bindings that augment or override class bindings, you'll probably
have to rework them.
- The -geometry option has been removed from toplevels, frames, and
listboxes; use -width and -height instead.
- When new text is added to a text widget, it only receives tags
present on *both* sides of the insertion point (it used to receive
any tags present to the left of the character).
- The class of Tk applications is no longer Tk; it is the
name of the script or program that embodies the application.
- The default padding for buttons and menubuttons has been changed
to match normal Motif behavior.
- Listboxes now return the selection as a string with one line per
entry, instead of a list.
- The transport format used for send has changed, so Tk 4.0
applications cannot communicate with Tk 3.6 applications.
- In entries, sel.last refers to the character just *after*
the last selected one, and the second index to the delete widget
command also refers to the character just after the last one to
delete.
- The Any modifier is now implicit in all bindings.
- In scrollbars, the -background option has been renamed to
-troughcolor, -foreground has been renamed to -background, and
-activeforeground has been renamed to -foreground.
- In scales, the -sliderforeground option has been renamed to
-background, -background has been renamed to -troughcolor, and
-activeforeground has been renamed to -activebackground.
- For checkbuttons, radiobuttons, and the corresdponding menu
entries, the -selector option has been renamed to -selectcolor,
and it can no longer be specified as empty; instead, use the
-indicatoron option to specify whether or not to draw the indicator.
- In binding scripts, % sequences that print window identifiers,
such as %a and %S, produce hexadecimal results instead of decimal.
- The enable and disable widget commands have been
eliminated for menus: use the -state configuration option instead.
- The activate and deactivate widget commands have been
eliminated for buttons, checkbuttons, radiobuttons, and menubuttons;
use the -state configuration option instead.
- The obsolete variable tkVersion is no longer supported; use
tk_version instead.
- The syntax of the scan widget command for texts has changed.
- Wish no longer recognizes the -help option.
- Tk always prints real numbers, such as canvas coordinates, with
a decimal point, so that they cannot get confused with integers.
- The command pack newinfo has been renamed to
pack info, and
the old pack info command (which was obsolete) no longer exists.
- The -scrollcommand option for entries has been changed to
-xscrollcommand, and the view widget command has been changed to
xview.
- Winfo exists no longer reports a window as existing if it is
in the process of being destroyed.
- The -padx and -pady options for the button family of widgets
are ignored if the button is displaying an image or bitmap; padding
is zero in these cases.
- In radiobuttons the -value option no longer defaults to the name
of the widget: an empty string is a valid value for it.
- The -menu option for menubuttons and cascade menu entries must
refer to a child of the menubutton or menu.
- The interpretation of @y in menus has changed: it no longer
returns none.
- The selection targets APPLICATION and WINDOW_NAME have been replaced
with TK_APPLICATION and TK_WINDOW.
- There is no longer a default focus, and focus none is no longer
supported. The focus command now returns an empty string instead of
none to signal that the application doesn't have the input focus.
- FocusIn and FocusOut events now use the standard X mechanism, so
the number and types of these events is different now.
- wm maxsize and wm minsize no longer accept empty
arguments.
- The -scrollincrement option for canvases has been eliminated.
C Code Incompatibilities
- The arguments to Tk_ManageGeometry have changed.
- The main procedure is no longer provided by Tk; it should now
be in the same file as Tcl_AppInit (see tkAppInit.c for an example).
- fill justify mode is no longer supported by Tk_GetJustify, and
the TK_CONFIG_JUSTIFY flat no longer exists (no widgets actually
supported this mode anyway).
- The procedures Tk_GetSelection, Tk_CreateSeleHandler, and
Tk_ClearSelection now take an additional selection argument.
- The obsolete procedure Tk_CreateFocusHandler has been removed.
- The procedure Tk_RegisterInterp no longer exists; Tk_SetAppName
now provides similar functionality.
- The interp argument to Tk_GetcolorByValue has been eliminated.