tkcon: Procedures SourceForge Logo
Documentation Purpose & Features Limitations To Do License
Online Demo (requires Tk plugin) Using TkCon with other Tk Languages
Getting Started Special Bindings Procedures Screenshot
dump tkcon idebug observe

There are several new procedures introduced in TkCon to improve productivity and/or account for lost functionality in the Tcl environment that users are used to in native environments. 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 further dump docs for details.
echo ?arg arg ...?
Concatenates the args and spits the result to the console (stdout).
edit ?-type type? ?-find str? ?-attach interp? arg NEW in v1.4, still under construction
Opens an editor with the data from arg. The optional type argument can be one of: proc, var or file. For proc or var, the arg may be a pattern.
idebug command ?args?
Interactive debugging command. See further idebug docs for details.
lremove ?-all? ?-regexp -glob? 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. If -regexp or -glob is specified, it interprets each item in the items list as a regexp or glob pattern to match against.
Aliased to edit.
Aliased to dir -full.
Aliased to edit.
observe type ?args?
This command provides passive runtime debugging output for variables and commands. See further observe docs for details.
puts (same options as always)
Redefined to put the output into TkCon
tkcon method ?args?
Multi-purpose command. See further tkcon docs for details.
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
what string
The what command will identify the word given in string in the Tcl environment and return a list of types that it was recognized as. Possible types are: alias, procedure, command, array variable, scalar variable, directory, file, widget, and executable. Used by procedures dump and which.
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).

© Jeffrey Hobbs