Enhanced Tk Console (TkCon) Docs: procedures


Top Level Documentation

New Procedures:

There are a few new procedures introduced in TkCon. There are also some redefined procedures. Here is a non-comprehensive list:
alias ?sourceCmd targetCmd ?arg arg ...??
Simple alias mechanism. It will overwrite existing commands. When called without args, it returns current aliases. Note that TkCon makes some aliases for you (in slaves). Don't delete those.
clear ?percentage?
Clears the text widget. Same as the <Control-l> binding, except this will accept a percentage of the buffer to clear (1-100, 100 default).
dir ?-all? ?-full? ?-long? ?pattern pattern ...?
Cheap way to get directory listings. Uses glob style pattern matching.
dump type ?-nocomplain? ?-filter pattern? ?--? pattern ?pattern ...?
The dump command provides a way for the user to spit out state information about the interpreter in a Tcl readable (and human readable) form. See attachment for details.
echo ?arg arg ...?
Concatenates the args and spits the result to the console (stdout).
idebug command ?args?
Interactive debugging command. See attachment for details.
lremove ?-all? list items
Removes one or more items from a list and returns the new list. If -all is specified, it removes all instances of each item in the list.
ls ?directory1 directory2 ...?
Aliased to dir.
observe type ?args?
This command provides passive runtime debugging output for variables and commands. See attachment for details.
puts (same options as always)
Redefined to put the output into TkCon
tkcon method ?args?
Multi-purpose command, see attachment.
tclindex ?-extensions patternlist? ?-index TCL_BOOLEAN? ?-package TCL_BOOLEAN? ?dir1 dir2 ...?
Convenience proc to update the tclIndex (controlled by -index switch) and/or pkgIndex.tcl (controlled by -package switch) file in the named directories based on the given pattern for files. It defaults to creating the tclIndex but not the pkgIndex.tcl file, with the directory defaulting to [pwd]. The extension defaults to *.tcl, with *.[info sharelibextension] added when -package is true.
unalias cmd
unaliases command
which command
Like the 'which' command of Unix shells, this will tell you if a particular command is known, and if so, whether it is internal or external to the interpreter. If it is an internal command and there is a slot in auto_index for it, it tells you the file that auto_index would load. This does not necessarily mean that that is where the file came from, but if it were not in the interpreter previously, then that is where the command was found.
There are several procedures that I use as helpers that some may find helpful in there coding (ie - expanding pathnames). Feel free to lift them from the code (but do assign proper attribution).
Contact jeff.hobbs@acm.org with questions.