Tcl, Tool Command Language, is an interpreted language with programming features, available across platforms running Unix, Windows and the Apple Macintosh operating system. Tk, the associated toolkit is an easy and efficient way of developing window based applications. Application tasks are split into modules and any new application specific task is written and compiled as C or C++ program and exported as a new Tcl command. Then a Tcl script, a series of existing and new Tcl commands, is composed to make the overall application. The scripting language, much like any shell language, has the ability to access and execute any other programs. Therefore several Tcl based applications could be made to work together to create or extend into a new application.
Tcl consists of few syntax rules and a (still growing) set of core commands. Tk provides a higher level application programming interface for developing interactive widgets based applications, particularly for those who wish to concentrate on the functionality of their application and have no need to gain indepth programming expertise in the underlying window system and/or verbose toolkits such as OSF/Motif. Tcl/Tk is free, available now on Apple Macintosh and Windows and has a wide user base with a rich and growing mass of useful contributed software. The wider availabilty, usage and ease of teaching and learning of Tcl/Tk makes it the most appropriate tool for teaching the principles of Graphical User Interface design and development.
The purpose of this cookbook is to provide a suite of simple examples with annotated comments so a novice user could quickly climb the learning curve by means of pattern matching. It is largely aimed at readers who are new to developing toolkit based applications and at those who only need to know how to develop simple interfaces and have relatively short time to achieve that. The emphasis is on enabling the readers gain familiarity with Tcl/Tk programming within a very short-time so they can proceed to develope their own. This cookbook, by this very nature, is not exhaustive.
For a comprehensive description of Tcl/Tk together with the underlying philosophy of design, the reader is recommended to "Tcl and the Tk Toolkit". For exhaustive programming examples the reader should consult "Practical Programming in Tcl and Tk". Readers may also be interested in looking up "Exploring Expect" which describes in detail Expect, which can be used to automate, for instance, routine system administration tasks.
It is worth noting that Tcl/Tk is evolving and valuable contributions towards extending its scope continue to grow. Hence the most up to date source of information for Tcl/Tk as well as the extensions is the accompanying manual pages.
This introduction is followed by a brief "Housekeeping" information which is suceeded by a short section on "Getting Started" with Tcl/Tk. The rest of the book is divided into individual chapters each of which takes the reader through examples that strive to provide an appreciation of Tcl and Tk and some extensions.
"Basics of Tcl" is set up to make use of the excellent HTML documents available on the public domain as an additional and detailed source of information. You can set up your favourite HTML browser (Mosaic or Netscape).
List of references is appended at the end.