dzach 25-Sep-2005: Deep Console v0.1.2 [L1 ] is a proof of a concept that sprang from What's wrong with the tree widgets?, which could see interesting implementations in tcl authoring tools. It is based on D. Richard Hipp's Tree widget. Here is one incarnation, in the body of the standard tk console. Another (better) candidate might be tkinspect:
The purpose:
The looks:
The enhanced console looks like this:
Usage:
There are three panes in Deep Console: The proc tree, the proc editor and the console. The tree is initially not populated, since the user might just want to run some console commands and populating the tree for a large application may take some seconds. To populate the tree just press <F2>.
The tree
The proc editor
The code
The tcl source code for the Deep Console can be found here [L2 ]. If you replace your existing: your_tcl_installation_dir/lib/tk8.4/console.tcl (for tcl/tk 8.4 installations) it will appear instead of the standard tk console.
Feel free to change it to taste.
Example
To use Deep Console, after you have replaced your standard tk console as described above, here is a small demo. Save it in a file e.g. test.tcl and run with wish (it doesn't work by pasting in tkcon):
package req Tk console show proc test1 {} { test2 } proc test2 {} { test3 } proc test3 {} { puts "Deep Console" }
History
v0.1.2: Corrected evaluation of proc script. When saving, evaluation was done in console's, instead of user's, space.
A similar concept was used for a debugger with syntax highlighting using ctext. IT also displays a tree of procs and variables with the possibility to edit procs at runtime.
dzach I wish I had seen this before. The deep browsing idea could be easily applied there too. Very cool.