Version 1 of Using Tk as a loadable package

Updated 2001-10-24 12:51:07

Starting with version 8.3.4 Tk can be loaded dynamically from a tclsh and automatically enters the event loop. The plain Tk8.3.4 is still missing a pkgIndex.tcl file, so for now one has to load tk by hand:

 load libtk8.3.so

This works for Linux. Please add the correct commands for other platforms.

Once Tk does ship with a propper pkgIndex.tcl, it will be loadable platfrom independently with:

 [[package require Tk]]

This opens up some interesting possibilities. For example one can start a tclsh outide of an X session and later load Tk into it to connect to an X server: