TCL/TK Tools

COMPUTER BOOK REVIEW  

434 words

Title:TCL/TK Tools;   Mark Harrison; O'Reilly & Associates Inc; 
ISBN: 1-56592-218-2; Paperback, 653 pages,  US $49.95, CAN $70.95

Reviewer: Tim Perkins, "TCL/TK Tools has much information that can't 
be covered adequately in a book review, which can only show the depth 
of the resource as well as the strength of the products it covers. For 
anyone in the field of data management or GUI development, TclL/TK 
Tools should become a valuable and familiar friend."

How "Tcl"ish are you?

This isn't a starter kit for Tcl/Tk. This reviewer recommends that a Tcl 
beginner first read "Tcl and the Tk Toolkit" by the author of the language, 
John Ousterhout to provide a firm grip on Tcl mechanics. After that, the 
reader will find this book to be a superb reference on the advanced, 
fine points of Tcl. 
	
Author, Mark Harrison leads the reader to an acquaintanceship with the 
object oriented scripting power of (incr Tcl). The object oriented 
techniques of inheritance and composition are demonstrated as the 
reader follows through the construction of classes and mega-widgets, 
resulting in a file browser script with a Windows 95 look to it. The mixing 
of C code in a (incr Tcl) project is also demonstrated. 
	
A host of new widgets for the developer to use is covered in the
(incr widgets), which is included with (incr Tcl) distributions, and Tix
(Tk Interface Extension) Mega-Widget hierarchies. 

These make available a choice of ready controls, such as combo boxes 
and file selection dialogs, that would take large amounts of time to 
implement without these hierarchies.  
	
The coverage on TclX was impressive. Here the author provides in-
depth coverage on the processing abilities of Tcl programming. The 
reader is toured through powerful string manipulation functions 
(ctoken, clength, ctype, etc..) and list processing data manipulation 
functions (lassign, lvarpush, lvarpop, etc..). We are also shown how 
to emulate a c-style struct or relational record using keyed lists. In 
addition, this chapter covers, system calls (fork, exec, pipe, etc.), file 
handling, and TCP/IP communication.
	
The chapter on "Embedded Tk" provides the reader with the ability to 
craft a user interface, in Tcl script style, and use it in compiled C 
programs using a preprocessor "et2c". The preprocessor recognizes 
flags in one's C code and expands them into code containing the existing 
Tcl - C interface (which is difficult to code on ones own). For example 
you may have a program like:
		#The PrettyScreen.c
		int main (int argc, char** argv)
		{
		 	Et_Init(&argc, argv);
			ET_INSTALL_COMMANDS;
			ET_INCLUDE(MyPrettyScreen.tcl);
			Et_MainLoop();
		}
By typing "et2c PrettyScreen.c > PrettyScreen_.c" and compiling the
"PrettyScreen_.c" file you get a compiled c program using compiled Tcl GUI
code. This affords a developer the ability to test an interface
separately from processing, as well as taking advantage of Tcl's ease
of implementation.
	
TCL/TK Tools has much information that can't be covered adequately in
a book review, which can only show the depth of the resource
as well as the strength of the products it covers. 

For anyone in the field of data management or GUI development, TclL/TK 
Tools should become a valuable and familiar friend. 

 


Back to Computer Book Reviews index

Back to Home page