Changes in Tk4.1

(Taken from the Release Notice)

Below is a list of the most important changes in Tk 4.1, relative to Tk 4.0. Besides these changes, there have been numerous bug fixes. For a complete list of absolutely every visible change, see the "changes" file in the distribution.

  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 commandline arguments.
  3. Text widgets have been improved in several ways:
  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.
  7. There is a new command "after info" that allows you to find out about pending "after" handlers that haven't yet fired.
  8. Scrollbars and scales now have proper button 2 support as required by Motif.
  9. Menus have two new options, -transient and -tearoffcommand.
  10. Entries have a new "bbox" widget command.
  11. When manual pages are installed, additional links are created for each of the procedures described in the manual page, so that it's easier to invoke the "man" command.
  12. Wish supports a new "--" option: it will only process options up through the --; anything after that will be passed through to the application in the argc and argv variables.

Incompatibilities

Although Tk 4.1 is compatible with Tk 4.0 scripts at the Tcl level, there are a few 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).
  3. Tk doesn't export any global C variables anymore, because this doesn't work with Windows DLLs. The C variable tk_NumMainWindows has been replaced with the procedures Tk_GetNumMainWindows(), and the variable tk_CanvasTagsOption has been replaced with the procedures Tk_CanvasTagsParseProc and Tk_CanvasTagsPrintProc.
  4. The interface to Tk_RestrictProc has changed so that the restrict procedure can ask for an event to be discarded, as well as processed or deferred.
    Hops (hops@sco.com) $ Last Modified: $Date: 1996/04/24 00:19:08 $: