Cutter
Integration with Tcl


return to main index



Executing Tcl/Tk

When a TCL script document is open in Cutter it can be "executed" using the menu bar command, Script > Execute, or by either of the following keyboard shortcuts ctrl + E, or option + E or Apple + E (Max OS X). Figure 1 shows the "Process Monitor" window displaying the output from a simple Tcl script.



Figure 1



Figure 2


Notice in the lower right hand corner of the script window in figure 1 the item "History 1 of 1". Each time a script document is "executed" a copy of the script is added to a history zip file. The history file for demo.tcl would be automatically saved in the same directory as the source file as "cutter_history/demo.tcl.zip".

The history window for demo.tcl can be opened either from the main menu bar
    History->Open History
or by pressing ctrl+H, or option+H. Navigation buttons at the top of the history window allow previous versions of a script to be viewed as well as executed. In figure 3 and 4, we can see that version 2 of the script has been re-executed.



Figure 3



Figure 4


Online Documentation from ActiveState

Cutter contains a distribution of web docs authored by ActiveState. Cutter can display the appropriate web page for a TCL command using either its own internal browser or the users preferred browser. For example, option + double clicking on, say, puts causes Cutter to open ActiveState doc in the internal Cutter browser.




Figure 5


Holding down the shift key while option + double clicking will display the appropriate document with the browser indicated in the Preferences.



Figure 6




© 2002- Malcolm Kesson. All rights reserved.