This section describes a light weight class library for creating
Tcl/Tk applications.  It consists of a header file
tcl++.h, and a main program
tclmain.cc. All you need to
do to create a Tcl/Tk application is write any application specific
Tcl commands using the NEWCMD macro, link your code with the
tclmain code, and then proceed to write the rest of your
application as a Tcl script. The
tclmain code uses argv to
get the name of a script to execute, so assuming that the executable
image part of your application is called
appl, you would
start off your application script with
#!appl ...Your Tcl/Tk code goes here...then your script becomes the application, directly launchable from the shell.
EcoLab processes any pending TCL events prior to executing the C++ implementation method. This keeps the GUI lively. However, it may cause problems if TCL scripts depend on C++ state that may be changed by event processing. There is a boolean global variable processEvents, that disables the background even processing if set to false. TCL commands enableEventProcessing and disableEventProcessing can be used to set/clear this flag from the TCL interface.