diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-01-07 21:05:28 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-01-07 21:05:28 (GMT) |
commit | c6415290e8f20f16e5a62350b9de153d2bdf29a6 (patch) | |
tree | e40090d8e0b4d5c40d0a91f333a23db1ebcb6fba /tkcon/docs | |
parent | cc7a4dfe87646677f2ac17cb8a403e522b5bf2a1 (diff) | |
parent | 0013d1381bef99a785ded5b295c70f613c78348e (diff) | |
download | blt-c6415290e8f20f16e5a62350b9de153d2bdf29a6.zip blt-c6415290e8f20f16e5a62350b9de153d2bdf29a6.tar.gz blt-c6415290e8f20f16e5a62350b9de153d2bdf29a6.tar.bz2 |
Merge commit '0013d1381bef99a785ded5b295c70f613c78348e' as 'tkcon'
Diffstat (limited to 'tkcon/docs')
-rwxr-xr-x | tkcon/docs/bindings.html | 154 | ||||
-rwxr-xr-x | tkcon/docs/changes.txt | 815 | ||||
-rw-r--r-- | tkcon/docs/demopic.png | bin | 0 -> 42253 bytes | |||
-rwxr-xr-x | tkcon/docs/dump.html | 100 | ||||
-rw-r--r-- | tkcon/docs/dump.n.man | 60 | ||||
-rwxr-xr-x | tkcon/docs/idebug.html | 125 | ||||
-rw-r--r-- | tkcon/docs/idebug.n.man | 83 | ||||
-rwxr-xr-x | tkcon/docs/index.html | 81 | ||||
-rwxr-xr-x | tkcon/docs/license.terms | 33 | ||||
-rwxr-xr-x | tkcon/docs/limits.html | 76 | ||||
-rwxr-xr-x | tkcon/docs/nontcl.html | 75 | ||||
-rwxr-xr-x | tkcon/docs/observe.html | 104 | ||||
-rw-r--r-- | tkcon/docs/observe.n.man | 55 | ||||
-rwxr-xr-x | tkcon/docs/perl.txt | 109 | ||||
-rwxr-xr-x | tkcon/docs/plugin.html | 113 | ||||
-rwxr-xr-x | tkcon/docs/procs.html | 167 | ||||
-rwxr-xr-x | tkcon/docs/purpose.html | 87 | ||||
-rwxr-xr-x | tkcon/docs/start.html | 358 | ||||
-rw-r--r-- | tkcon/docs/style.css | 50 | ||||
-rw-r--r-- | tkcon/docs/tkcon.1.man | 369 | ||||
-rwxr-xr-x | tkcon/docs/tkcon.html | 189 | ||||
-rw-r--r-- | tkcon/docs/tkcon.n.man | 140 | ||||
-rw-r--r-- | tkcon/docs/tkconrc.5.man | 249 | ||||
-rwxr-xr-x | tkcon/docs/todo.html | 99 |
24 files changed, 3691 insertions, 0 deletions
diff --git a/tkcon/docs/bindings.html b/tkcon/docs/bindings.html new file mode 100755 index 0000000..f6a13c5 --- /dev/null +++ b/tkcon/docs/bindings.html @@ -0,0 +1,154 @@ +<HTML> +<HEAD> +<TITLE>tkcon: Special Bindings</TITLE> +<LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css"> +</HEAD> + +<BODY BGCOLOR=#FFFFFF> + +<TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD> +<!-- start header info --> +<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF> +<TR> +<TH><FONT SIZE=+3>tkcon: Special Bindings</FONT></TH> +<TD align=right> +<A href="http://tkcon.sourceforge.net/"> +<IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88" +height="31" border="0" alt="SourceForge Logo"></A> +</TD> +</TR> +</TABLE> +<!-- end header info --> + +</TD></TR><TR><TD> +<!-- start main navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> +<TR> +<TH CLASS="hi"><A HREF="index.html" CLASS="hi">Documentation</A></TH> +<TH><A HREF="purpose.html">Purpose & Features</A></TH> +<TH><A HREF="limits.html">Limitations</A></TH> +<TH><A HREF="todo.html">To Do</A></TH> +<TH><A HREF="license.terms">License</A></TH> +</TR><TR> +<TH COLSPAN=2><A HREF="plugin.html">Online Demo</A> +(requires <A HREF="http://tcl.activestate.com/software/plugin/">Tk plugin</A>)</TH> +<TH COLSPAN=3><A HREF="nontcl.html">Using TkCon with other Tk Languages</A></TH> +</TR> +</TABLE> +<!-- end main navigation table --> +</TD></TR><TR><TD> +<!-- start secondary navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#BBBBBB width=100%> +<TR> +<TH><A HREF="start.html">Getting Started</A></TH> +<TH CLASS="hi2"><A HREF="bindings.html" CLASS="hi2">Special Bindings</A></TH> +<TH><A HREF="procs.html">Procedures</A></TH> +<TH><A HREF="demopic.png">Screenshot</A></TH> +</TR> +<TR> +<TH><A HREF="dump.html"><CODE>dump</CODE></A></TH> +<TH><A HREF="tkcon.html"><CODE>tkcon</CODE></A></TH> +<TH><A HREF="idebug.html"><CODE>idebug</CODE></A></TH> +<TH><A HREF="observe.html"><CODE>observe</CODE></A></TH> +</TR> +</TABLE> +<!-- end secondary navigation table --> +</TD></TR><TR><TD BGCOLOR=#FFFFFF> +<DIV CLASS="indent"> + <P> +Most of the bindings are the same as for the Text widget. Some have been +modified to make sure that the integrity of the console is maintained. +Others have been added to enhance the usefulness of the console. Only +the modified or new bindings are listed here. + <P> + +<DL compact> +<DT> <B>Control-x</B> or <B>Cut</B> (on Sparc5 keyboards) +<DD> Cut +<DT> <B>Control-c</B> or <B>Copy</B> (on Sparc5 keyboards) +<DD> Copy +<DT> <B>Control-v</B> or <B>Paste</B> (on Sparc5 keyboards) +<DD> Paste +<DT> <B>Insert</B> +<DD> Insert (duh). + <P> +<DT> <B>Up</B> +<DD> Goes up one level in the commands line history when cursor is on the +prompt line, otherwise it moves through the buffer +<DT> <B>Down</B> +<DD> Goes down one level in the commands line history when cursor is on the +last line of the buffer, otherwise it moves through the buffer +<DT> <B>Control-p</B> +<DD> Goes up one level in the commands line history +<DT> <B>Control-n</B> +<DD> Goes down one level in the commands line history + <P> +<DT> <B>Tab</B> +<DD> Tries to expand file path names, then variable names, then proc names. +<DT> <B>Escape</B> +<DD> Tries to expand file path names. +<DT> <B>Control-P</B> +<DD> Tries to expand procedure names. The procedure names will be those +that are actually in the attached interpreter (unless nontcl is specified, +in which case it always does the lookup in the default slave interpreter). +<DT> <B>Control-V</B> +<DD> Tries to expand variable names (those returned by [info vars]). +It's search behavior is like that for procedure names. + <P> +<DT> <B>Return</B> or <B>Enter</B> +<DD> Evaluates the current command line if it is a complete command, +otherwise it just goes to a new line +<DT> <B>Control-a</B> +<DD> Go to the beginning of the current command line +<DT> <B>Control-l</B> +<DD> Clear the entire console buffer +<DT> <B>Control-r</B> +<DD> Searches backwards in the history for any command that contains the +string in the current command line. Repeatable to search farther back. +The matching substring off the found command will blink. +<DT> <B>Control-s</B> +<DD> As above, but searches forward (only useful if you searched too far back). +<DT> <B>Control-t</B> +<DD> Transposes characters +<DT> <B>Control-u</B> +<DD> Clear the current command line +<DT> <B>Control-z</B> +<DD> Saves current command line in a buffer that can be retrieved with +another <B>Control-z</B>. If the current command line is empty, then any +saved command is retrieved without being overwritten, otherwise the +current contents get swapped with what's in the saved command buffer. + <P> +<DT> <B>Control-Key-1</B> +<DD> Attaches console to the console's slave interpreter +<DT> <B>Control-Key-2</B> +<DD> Attaches console to the console's master interpreter +<DT> <B>Control-Key-3</B> +<DD> Attaches console to main TkCon interpreter +<DT> <B>Control-A</B> +<DD> Pops up the "About" dialog +<DT> <B>Control-N</B> +<DD> Creates a new console. Each console has separate state, including +it's own widget hierarchy (it's a slave interpreter). +<DT> <B>Control-q</B> +<DD> Close the current console OR Quit the program (depends on the value +of TKCON(slaveexit)). +<DT> <B>Control-w</B> +<DD> Closes the current console. Closing the main console will exit the +program (something has to control all the slaves...) +</DL> + +TkCon also has <B>electric bracing</B> (similar to that in emacs). It will +highlight matching pairs of {}'s, []'s, ()'s and ""'s. For the first three, +if there is no matching left element for the right, then it blinks the +entire current command line. For the double quote, if there is no proper +match then it just blinks the current double quote character. It does +properly recognize most escaping (except escaped escapes), but does not look +for commenting (why would you interactively put comments in?). +</DIV> +</TD></TR></TABLE> + +<HR NOSHADE SIZE=1> +<ADDRESS><FONT SIZE=2>© Jeffrey Hobbs</FONT></ADDRESS> + +</BODY> +</HTML> diff --git a/tkcon/docs/changes.txt b/tkcon/docs/changes.txt new file mode 100755 index 0000000..b0c8ed6 --- /dev/null +++ b/tkcon/docs/changes.txt @@ -0,0 +1,815 @@ +ENHANCED TK CONSOLE changes +------------------------------------------------------------------------- +Changes file begun Tue May 7 19:09:51 PDT 1996 +Newest changes at top of file. Release dates between '----'s. +Changes for a particular version are BELOW the release date line. + +Attribution for code is specified after change, a preceding slash +indicates an idea/bug report attribution fixed by myself. Where +no attribution is made, assume (Hobbs). +------------------------------------------------------------------------- + +THIS FILE IS NO LONGER PERTINENT. + +All changes are now recorded in the ChangeLog. + +---- March 31 1999 v1.6 ---- + +Changed tkConInsert to not use catch (avoids any error generation). + +Changed if check on auto_load in tcl_unknown to an llength on the +args (from [info tclversion]) as 8.0p0 also used just one arg. + +Added -exec command line arg, so that users could do the -exec "" +trick (causes tkcon to skip multi-interpreter model) and makes it +easier to drop tkcon as a console on extended wish executables. + +Changed handling of fixed font for all tkcon text widgets, adding +new -font option, TKCON(font) var, and redoing 'tkcon font'. + +Added color,(disabled|cursor|bg) variables as per Becker's +recommendations, allowing for old defaults. + +Changed multiple instances of string comparisons with llength, +where appropriate. + +Changed dump proc to not try and auto_load a proc arg and improved +recognition of procs in namespaces. + +Added new 'what' proc to environment that tells you what a string +is recognized as. Now used in various other procs. + +Improved hot errors to not pop up edit dialog when the mouse moved. + +---- March 5 1999 v1.5 ---- + +Expanded tkConSave to support use in 'edit'. + +Added tkConGarbageCollect proc for periodic cleanup tasks +(currently, cleaning up error tags in the console widget), +with new gc-delay TKCON var. + +Revised error handling (errors are now hot in the console). + +Changed tkConExpandPathname to recognise that NT for 8.1+ is +case-sensitive, and to not change case for other Windows configs +when no further expansion was made. + +Made changes to tkConEvalOther and the aliasing of tkConEvalAttached +for "Main" for more accurate evaluation. + +Changed the conditional 'update' in tkcon_puts (that overrides the +core puts) to 'update idletasks'. This prevents problems with +using puts in fileevent triggers and such. + +Added check to prevent lower-casing during pathname expansion when +no further expansion can be made on a string. + +New auto-buffer (default 512 lines, set in TKCON(buffer)) for the +console widget. Set this ridiculously high if you liked the +text widget holding all that data. New tkcon buffer method to +go with it. + +Rewrote edit command. Previous version was mostly bogus when used +outside the original slave. + +Change tkcon error to use updated 'edit' command. + +Massaged tkConEvalOther & tkConInterpEval. + +Fixed problem with Show Last Error where a TkCon generated error +was always appearing (from Package Submenu) and moved it above +the packages submenu. + +Removed auto_execok from the slaveprocs list. + +Removed slaveappalias as it didn't work correctly. Made 'edit' +a slavealias, with tkConAttach used to determine where it was +called from + +Changed some regexps around to pass tclCheck's mistaken warnings +(tclCheck's bad matching, not bad regexps). + +Changed dump to not try widgets before commands, as otherwise +it won't automatically complain. + +Fixed pathname completion to only beep when trying to expand on a +non-existent subdirectory (instead of throwing no-directory error). + +Fixed a few notes that TclPro's checker picked up (only one actual +bug in the all switch of 'edit', otherwise it was mostly blowing +wind...). (lvirden) + +---- February 17 1999 v1.4 ---- + +Changed "changes" file to "changes.txt". + +Added edit/more/less proc that allows for the viewing/editing +and returning back to the slave of vars/procs or files. + +Modified history to not got below 0. + +lremove extended with -pattern arg. + +Added code in tcl_unknown to ask about loading Tk when someone tries +a Tk command without Tk being loaded. + +Had to change regexps because \E in Tcl8.1a2 was removed in 8.1b1 (arg!). + +Added "Make Xauth Secure" button for Unix. (heiko.federhenn@stest.ch) + +Fixed tkConInitInterp (used by "Send TkCon Commands") to reattach to +the named namespace when appropriate. + +Fixed bug in popup-menu for Tk8 (bound to wrong toplevel). + +Fixed bug in tcl_unknown confusing auto_load between 8.0 and 7.x. + +Made Interp->Package menu more dynamic, so it recognizes changes in +auto_path and updates itself when Interp is torn-off. + +Removed list from $new in exec redirect for tcl_unknown. (found by Imai) + +Changed package menu to handle multiple package versions. + +Added bogus package require statement to master and slaves to ensure +that pkgIndex.tcl files were properly loaded into interps. + +If "Main" is passed to tkConAttachNamespace, it is interpreted as "::". + +Changed "Attach Namespace" menu to provide a listbox popup when +more than $TKCON(maxmenu) namespaces are present. + +---- June 1998 v1.3 ---- + +fixed long-standing expr bug (missing '$') in tkConSafeBind - found +by TclPro! + +took out the use of tkcon_gets because it only worked for global vars. + +---- March 1998 v1.2 unreleased ---- + +updated regexps in some places to support 8.1 regexps. + +dump now outputs only non-default options for widgets. (ridgway) + +Sorted output list for multiple tab matched items. + +Several minor changes for the plugin (user should see no difference). + +Known problems with dump command understanding namespaces have been +fixed, but only for the 8.0 only version. + +Changed tkConTagProc to recognize ';' as not part of a proc name. + +Changed tkConNew to reuse slave numbers. + +Fixed problem with TKCON(exec) == {} (needed uplevel #0 instead of eval). + +On Mac, tries to source itself using -rsrc (8.0). (nijtmans) + +Changed to use 8.0 menu scheme if possible. (nijtmans) + +Changed tkConInitSlave and tkConNew to only set argv0 in new slave if it +exists (it won't in the plugin). (demailly) + +Changed tkConInit to only checkpoint state once if the slave interp +and main interp are the same (TKCON(exec) == {}). + +---- 08 October 1997 v1.1 ---- + +For Tk8, made TkCon use a fixed font {Courier, size 10} if the current +font is not of fixed type. + +Startup errors should now be found in the TkCon last error function. + +Changed the Triple-1 binding to not include last newline. + +Added fix to make sure that double-evaluation of the command line +didn't occur (might occur for commands that used vwait or something). + +TKCON(errorInfo) is now set with all the errors that occur during start-up, +so that you don't lose stack trace information. + +---- July 03 1997 v1.03 ---- + +Updated namespace eval stuff for Tk8.0b2. + +rewrote tkConSepCmd. + +ls is now "dir -full" by default. + +changed the puts renaming from tcl_puts to tkcon_tcl_puts (so that it +specifies what renamed it). + +added variable highlighting to command highlighting as a background (so +that a command and var can be seen for the same word). + +increased default history size to 48. + +Fixed problem where aliased exit couldn't take extra args. + +replaced old [tkcon gets] with a new UI version to be used with the new +tkcon_gets that, like tkcon_puts, replaces the Tcl gets with a version that +doesn't rely on stdin being present. [tkcon gets] now accepts no args. + **** POTENTIAL INCOMPATIBILITY **** + +---- June 10 1997 v1.02 ---- + +Changed calculator mode commands to be put in the history (but the +output still looks like an error). + +Fixed bug where "source" was assumed to work for primary interp, +causing failure to load in Tk plugin. + +Fixed problem with the id'ing of the primary TkCon interpreter that would +affect attaching to like named interps. + +---- June 8 1997 v1.01 ---- + +minor streamlining in tkConEvalCmd. + +added file menu and separated some items from console menu. + +added support for connecting directly to a namespace (itcl or Tcl8). + +Fixed several potential problems where args to tkConEvalAttached where +not properly protected from eval. + +added slaveexit variable to allow for exit in slaves to be non-destructive, +which is the new default. + +enhanced Tab binding, made Escape the default pathname-only expansion. + +enhanced dump and which commands. + +Removed auto_execok redefinition for Tcl7.5-. TkCon is now intended to +only run in Tcl7.6+ interpreters (though attaching to 7.5- is still OK). + +Added Load/Save menus and expanded Save functionality. + +---- June 1 1997 v1.00 ---- + +TkCon now use virtual events for bindings (REQUIRES TK4.2+) and changed +Console to TkConsole (to not conflict with new Console megawidget). + +Updated tcl_unknown to match Tcl8's unknown. + +Changed handling of preferences directory for macintosh. + **** POTENTIAL INCOMPATIBILITY **** + +Changed tkCon global var to TKCON. + **** POTENTIAL INCOMPATIBILITY **** + +Changed colors to use absolute #RRGGBB format for color-name disadvantaged +systems. + +Removed use of tkCon(font) variable. + **** POTENTIAL INCOMPATIBILITY **** + +Fixed procname expansion to work on/in namespaces. + +Fixed pathname expansion to expand on a directory. + +Fixed all if's to use {}s (better for Tcl8). + +Fixed potential paste problems, it now tries to get the general selection +first, then the CLIPBOARD selection. + +Fixed problem with 'puts' being renamed too early. + +Added calcmode variable to allow typing expr commands write at the tkCon +command line without always saying expr (handled in tkConEvalCmd). + +---- no official release v0.72 ---- + +Changed tkConAbout to use text widget so info could be selected. + +Fixed problem with pathname expansion on windows due to case insensitivity. +(how can anyone work with such an insensitive OS?) + +Fixed off-by-one error in history substitution reported by +<s-imai@lsi.tmg.nec.co.jp>. + +Fixed error in the handling of packages with a space in the name. + +Removed general return of output from rcfile, now only errors are returned. + +New tkConEvent proc to handle event movement, fixed search event problem +where cached event would become incorrect. + +new blinkrange variable to change electric bracing style. + +---- December 20th 1996 v0.71 ---- + +changed to not use upvar for nested arrays (bad for Tcl8). + +catch package require statement for detecting loadable libraries. + +---- November 15th 1996 v0.70 ---- + +Fixed problem with virtual event C/C/P bindings. (reported by +robin@jessikat.demon.co.uk) + +---- November 15th 1996 v0.69 ---- + +Added auto_execok to tkCon(slaveprocs), fixes "unknown" command bug. + +Fix for 'event' to work with plugin. (nijtmans) + +Added '--' and '-filter' options to 'dump'. + +---- November 13th 1996 v0.68 ---- + +Added $tk_library to auto_path for safe slaves loading Tk. (nijtmans) + +Made "r" the default mode for tkConSafeOpen. (nijtmans) + +Changed global delcarations in tkConInit to avoid conflicts with +Nijtmans' plus patch. + +---- November 11th 1996 v0.67 ---- + +Fixed weird backslashing in tkConSafeWindow + +---- November 8th 1996 v0.66 ---- + +Further changes for Tk plugin compatibility. (nijtmans) + +---- November 7th 1996 v0.65 ---- + +Started to add to plugin compatible code. (nijtmans) + +Reworked tkConFind* to accept optional args. + +Added History menu which display last ten commands in history. + +Removed 'auto_execpath' and changed for new version of 'auto_execok' (in +'which' and 'unknown'), which will be redefined when TkCon is run in Tcl7.5. + +The attached environment is now checkpointed at startup (by default +this is the slave). + +Fixed 'dump var' to use list when printing out nested array elements + +Added 'update' to puts, as well as better error reporting for tcl_puts. +(nijtmans) + +Improved bracing around elseif statements. + +Removed 'warn' alias from distribution. Seemed superfluous. + +Added support for requiring Tk in Tcl8+. + +Made TkCon use tkCon(cols) and tkCon(rows) for startup text size. + +---- September 30th 1996 v0.64 ---- + +Changed the way 'idebug' integrates with TkCon. + +Changed to require Tk of version [expr $tcl_version-3.4]. + +Fixed bug in observe_var (upvar shouldn't have had the \#0). + +Made Interp->Inspect menu disappear if TkConInspect package was not present. + +Made package handling only enabled for Tcl7.5+ interps and reworked +how packages were recognized. + +! Removed virtual events from Console bindings so that they don't screw +! up the Console bindings (temporary fix). + +Changed how initially loaded packages were detected. (nijtmans) + +Made all globals visible in tkConInit. (/nijtmans) + +---- September 23rd 1996 v0.63 ---- + +Changed 'tkConFindBox' to not screw up search string. + +---- September 20th 1996 v0.62 ---- + +Added option for automagically ignoring dead interpreter problems. (wart) + +Fixed bug for reattaching to default slave via menu. (wart) + +Changed how 'observe' spit out trace info for commands. + +Modified 'idebug' internals. + +Made 'idebug' create its own tkCon(exec) slave for maintaining history. + +Fixed long-standing bug in 'lremove' for -all switch. + +Made tkCon(SCRIPT) follow links to the true source script. + +Added 'idebug puts' and 'idebug echo' methods. + +Fixed 'idebug break' to not work at level 0. + +Removed line that could improperly set $name and placed a 'catch' +around the 'interp alias' for 'ls' in tkConInitInterp. + +tkConInit(Slave|Interp) now just 'catch'es the renaming of puts. + +Added 'tkcon set' and 'tkcon upvar' methods. (nijtmans) + +---- September 17th 1996 v0.61 ---- + +Added 'idebug' interactive debugging proc based off Stephen Uhler's all-Tcl +debugger (Oct'95 _Linux_Journal_). Should work w/ or w/o TkCon. + +Added back accidental removal of 'ls' alias in slaves. + +---- September 15th 1996 v0.60 ---- + +Added 'tkcon find str' method and find box to TkCon. + +Added 'observe{_var}' command for simple tracing of vars/cmds with +output in the TkCon console window. + +Reworked tkConFillAppsMenu to be more efficient and correct. + +Added 'echo' as an internal proc and included it in tkCon(slaveprocs). + +Removed tkCon(prompt2). + +Changed tkCon(lightcmd) default to 1 from 0. + +Improved 'tkcon error' to allow it to check the errorInfo of other apps. + +'dump var' now outputs nested array values. (loverso) + +Changed tkCon(Load|Save) to use the new Tk4.2 dialogs if available. + +Fixed tkConPrompt problem where marks were set incorrectly sometimes +when it was called by an event (such as <Control-1>). + +Added bgerror to slaves and 'tkcon bgerror' method. (nijtmans) + +Added tcl_unknown along with other minor mods to get TkCon to work better +with IncrTcl. (nijtmans) + +Made <Triple-1> binding not include the prompt. + +Add null Console bindings for the tkCon(root) bindings to avoid them +getting generated spuriously. (Hobbs / Wart) + +Added -argv/-- command line option. This has very limited use, but is very +good for wrapping TkCon around an existing application which has it's own +command line args. It resets $argv in the main interpreter to what remains +on the command line and TkCon ignores argv. This carries over to any "New +Consoles". + +Reintroduced state procedures, placed them in Interp menu. These should +only be used if you really understand what they do. + +Added 'dump command' method. Usefulness over 'dump proc' is minimal. + +Tightened up the command line args, dropped several optional switches. + +Placed all the Console bindings into tkConBindings, which is called +in tkConInitUI. + +Added 'tkConInitInterp' which places the tkCon shell commands (already +available in any tkCon slave) in the interpreter. It also rewires +puts to send the result back to tkCon. + +Fixed dead attachment problem where attaching to another interp after +being connected to a dead interp would munge the new interp's name. (H / Wart) + +Added 'tkConEvalOther' which evals in the named interpreter. + +Removed 'tkConCheckPackages'. Package handling is now separated into the +autoloading part in tkConInit and into tkConInterpMenu which determines +available static libraries and packages for an interpreter. Menus redesigned. + +Changed 'tkcon eval' to 'tkcon master' since eval gave the wrong connotation. + +Made '-nontcl' option take a TCL_BOOLEAN argument. + +Made 'which' return unknown commands as an error. + +Added button into the help window to send the help URL to netscape. + +Made history substitution spit out a correctly translated command if +evaluation doesn't return an error. + +Changed history search to use the same event id as regular command line +history. + +Added tkCon(meta) variable which varies the Meta definition based on the +platform (Unix == Meta; Win == Alt; Mac == Command) + +Added 'dump widget' method. Spits out current widget state as returned +by '.widget configure'. + +Changed 'dump proc' and 'which' to try and auto_load an unknown procedure. + +Added 'tkcon history' command to return a source'able history stack. + +Fixed off-by-one error in tkConExpand (caused expansion to not work unless +you were expanding the last thing on the line and also not if a special +char was the first on the line). + +Fixed TkCon package handling to work properly for IncrTcl. (nijtmans) + +---- July 31 1996 v0.52 ---- + +Reversed changes file to have newest at top. + +Added 'tkcon version' command. + +Fixed scoping problem when attaching to the master interpreter of a +particular console. + +Rewrote the expansion routines to handle spaces in names better (no longer +requires the user to use grouping as it puts in '\ ' for spaces). + +Fixed off-by-one bug in tkConExpandBestMatch(2). + +Rewired attachments so that when 'send' is used to attach to an app and an +error occurs, TkCon determines whether the app still exists to prevent +multiple errors from arising due to a dead attachment. If this occurs, it +prompts the user on whether to return to the primary slave or to check +periodically for the attached interpreter to come back. tkConEvalSend was +added to facilitate this. + +Command highlighting is now only attempted when a non-empty character is +inserted into the command line (%A != {}). + +Added Ctrl-2 accelerator to get attach to master interpreter of a console +and Ctrl-3 to get to attach to the Main interpreter. + +Made the attachment to Main set the tkCon(app) to Main (to get around the +menu -value {} bug) and also set tkConEvalAttached alias to 'tkConMain eval'. + +Rewrote tkConPrompt to accept "pre" and "post" args to place before and +after the prompt is printed. pre is tagged stdout, post is tagged stdin. + +Rewrote 'dump var' to recognize nested arrays, but not output them +(it's too complicated to do that in source'able form), as well as +recognize empty arrays. + +Rewrote tkConEvalCmd to keep track of errorInfo when errors occur. + +Added 'tkcon error' to display the last errorInfo. + +Changed dumpproc and dumpvar to dump (proc|var) ... + +Added -root argument to set the tkCon(root) variable explicitly. + +Changed the -(slave)eval args to append to rather than set their vars +so that they can be specified multiple times on the command line. + +Added a limit argument to tkConMatch{Quote,Pair}. + +Rewrote dumpvar to recognize a single array value name (ie: a(b)). + +Renamed default non-Unix resource filename from from tkcon.bat to tkcon.cfg. + +No longer 'catch' the renaming of puts in a slave, because we'd want to +know if that threw an error, although it never should... + +---- July 14 1996 v0.51 ---- + +Removed tkConUsage since it was never called. + +Changed tkCon(Load|Save) to use tkFileSelect, if it exists. + +Added -load and -pkg equivalents for -package. + +Added Ctrl-Key-1 binding to reattach to primary slave. + +TkCon now will create itself in a different toplevel if there are already +children of . when tkConInit is called. + +Changed tkConInitSlave not to overwrite tcl_puts in a slave if it exists. + +Created tkCon(slaveprocs) to identify what procs get dumped into a +slave each time and tkCon(slavealias) to identify what will be +aliased back into the main interpreter. + +---- July 4 1996 v0.50 ---- + +Number of history events to keep now set by tkCon(history). + +'unknown' reworked (yet again) to properly handle itself in either the slave +or another interpreter. History substition was moved into tkConEvalCmd and +made an option (via tkCon(subhistory)). + +Inlined _dir into dir/ls. It doesn't save any cycles, but it removes +the need to manage _dir. + +Fixed 'dir/ls -f' to denote executable files with a *. + +Fixed dir/ls to not die on 'dir -f <pattern>'. (Thanks to steven@indra.com) + +Changed tkConExpand to stop at $ as well. + +Changed tkConTagProc binding from Console <KeyRelease> to PostCon <KeyPress>. +It seems to miss a lot less now. + +---- July 3 1996 v0.49 ---- + +Slight mod to <BackSpace>. + +Fixed <Delete> binding to not allow deletions of pre-Prompt text when a +selection is made. + +Fixed tkConEvalCmd to properly send commands to foreign interpreters even +if $tkCon(nontcl) was set. + +Made tkConEvalAttached be some type of alias at all times. + +Changed 'slavescript' to 'slaveeval' and added an 'eval' option. + +---- June 25 1996 v0.48 ---- + +Fixed 'alias' problem with multiple args. + +Updated binding system to automatically set Console bindings to equivalent +Text bindings, then redefine what we want. + +Updated tkConTagProc to eval in attached slaves. This can make it +really slow when attached to foreign interpreters. + +---- June 25 1996 v0.47 ---- + +Fixed tkConExpandBest* to be more accurate ([string first] is only valid +for us when it returns 0). + +Updated tkConExpandPathname to work better for attached interpreters. + +Renamed tkExpand* to tkConExpand* (they'd become too TkCon oriented). + +Changed tkConEvalCmd to 'list' instead of 'concat' command for attached +interpreters, and to ignore the whole thing if [string match {} $cmd]. + +Removed many bindings that were exactly duplicated by "Text" binding. + +Added tkCon(blinktime) option to allow user to specify blink duration. +Value must be at least 100 (millisecs). + +Removed tkConUpDownLine. It never varied from tkTextUpDownLine. + +Improved package loading to handle bad pkgIndex.tcl entries. + +---- June 21 1996 v0.46 ---- + +Improved package loading to be correct. + +Made 'dir' more Mac/Windows friendly (I hope). + +---- June 21 1996 v0.45 (skipped v0.44) ---- + +Added "Non-Tcl Attachments" preference to disallow sends to interpreters +which may not understand Tcl (ie - SchemeTk, PerlTk). + +Rewrote tkConCheckPackages to allow calling it without a widget reference. + +Updated tkConEvalCmd. + +Added tkConEvalAttached to evaluate more things in the right place. + +Rewrote tkConAttach to allow for attaching directly to slave interpreters +(no send required). "Attach Console" menu now lists all slave interpreters +by slave path (with Tk interp name in ()s), separate from foreign interps. + +Add tkConInitSlave to create a TkCon slave. + +Renamed tkExpand* to tclExpand*. + +Updated 'dir' for better output. + +Added command line argument support, rearranged tkConInit to support it. + +---- June 18 1996 v0.43 ---- + +Fixed 'unknown' to work in both slave and master interpreter. + +Modified 'dir' to be dumpproc'ed into slave. + +Rewrote 'clear' to be dumpproc'ed as well. + +Fixed 'puts' bug for slaves. + +---- June 17 1996 v0.42 ---- + +Added extra loop to tkConCheckPackages to account for packages that may +auto-load Tk itself (like Tix or Tksteal). + +---- June 15 1996 v0.41 ---- + +Added 'warn' as an alias back into the main interpreter. + +Fixed documentation leftovers (and updated upgrade.html) to include the +move of the 'main' and 'slave' commands into 'tkcon'. + +Fixed problem in 'clear' command + +---- June 14 1996 v0.40 Released ---- + +OK, I need to add some MAJOR changes here... + +Added package handling. + +Moved to two-level interpreter model (master control/slave execution). + +---- June 13 1996 v0.38 ---- + +Fixed auto_execpath to work on windows + +---- June 11 1996 v0.37 ---- + +Improved 'tkConResource' to get the right script name on all platforms +under all manner of circumstances + +Improved sourcing of tkCon resource file to not throw bogus errors + +---- Jun 10 1996 v0.36 ---- + +Fixed <Control-n> bug (incr $tkCon(event) --> incr tkCon(event)) + +---- June 8 1996 v0.35 ---- + +Removed "Resource" from 'Edit' menu + +Rewrote 'clear' to accept percentage level + +Fixed <Control-s> forward history search bug + +---- June 6 1996 v0.34 ---- + +Added 'clean' alias to revert a slave to its "pristine" state + +Added tkConState* procs to monitor state and be able to revert it + +Enhanced 'which' and added an 'auto_execpath' proc. + +Removed all known global uses of 'tmp*' variables. + +Fixed problem in tkExpandPathname that munged pathnames with spaces. + +Fixed problem in many places where spaces in directories and command names +might get things confused. + +Fixed problem with non-interactive slaves. + +Commented out binding that recreates a deleted console window. + +Add tclindex command. + +Added support for -full to ls/dir. + +Added command buffer save and command buffer search bindings. + +Added Prefs menu. + +Changed File menu name to Console. + +Removed 'Load/Save File' command from File menu (to easy to source) and +added 'save' command. + +Changed dumpvar to use "array set ..." when outputting array values. + +Changed tkCon to use tkcon.rc on non-unix machines. + +Revamped tkConInit and source file to make sure nothing specific to tkCon +was set until an Init proc was called. + +---- May 10 1996 Made 0.27 Available to the public ---- + +---- May 8 1996 Released 0.26 Third semi-public release ---- + +tkConNew now returns the name of the newly created interpreter. + +Added 'main' and 'slave' inter-console communication commands. Also, +all slave interpreters become commands in all slave consoles (make sure +not to name procs "slave#") when created. tkConOtherInterp proc added +to handle the communication. + +Moved tkConDestroy and tkConNew into new proc tkConMainInit to prevent +resourcing problems with slave interpreters + +Fixed 'puts' bug by removing all 'uplevel subst ...' and placing an +'eval ...' at the beginning. + +---- May 7 1996 Released 0.25 Second semi-public release ---- + +Discovered bug in puts/output sequence - still searching + +Added unalias command, fixed alias command to not unalias commands if +not enough args were passed + +Updated 'unknown' to mirror current tcl7.5 'unknown' + +Changed var names inside some procs + +Added comments to most procs + +Fixed off-by-one bug in tkExpandPathname + +---- May 4 1996 Released 0.24 First semi-public release ---- + +Changes file begun Tue May 7 19:09:51 PDT 1996 diff --git a/tkcon/docs/demopic.png b/tkcon/docs/demopic.png Binary files differnew file mode 100644 index 0000000..799c09c --- /dev/null +++ b/tkcon/docs/demopic.png diff --git a/tkcon/docs/dump.html b/tkcon/docs/dump.html new file mode 100755 index 0000000..87e7873 --- /dev/null +++ b/tkcon/docs/dump.html @@ -0,0 +1,100 @@ +<HTML> +<HEAD> +<TITLE>tkcon: dump procedure</TITLE> +<LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css"> +</HEAD> + +<BODY BGCOLOR=#FFFFFF> + +<TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD> +<!-- start header info --> +<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF> +<TR> +<TH><FONT SIZE=+3>tkcon: <CODE>dump</CODE> procedure</FONT></TH> +<TD align=right> +<A href="http://tkcon.sourceforge.net/"> +<IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88" +height="31" border="0" alt="SourceForge Logo"></A> +</TD> +</TR> +</TABLE> +<!-- end header info --> + +</TD></TR><TR><TD> +<!-- start main navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> +<TR> +<TH CLASS="hi"><A HREF="index.html" CLASS="hi">Documentation</A></TH> +<TH><A HREF="purpose.html">Purpose & Features</A></TH> +<TH><A HREF="limits.html">Limitations</A></TH> +<TH><A HREF="todo.html">To Do</A></TH> +<TH><A HREF="license.terms">License</A></TH> +</TR><TR> +<TH COLSPAN=2><A HREF="plugin.html">Online Demo</A> +(requires <A HREF="http://tcl.activestate.com/software/plugin/">Tk plugin</A>)</TH> +<TH COLSPAN=3><A HREF="nontcl.html">Using TkCon with other Tk Languages</A></TH> +</TR> +</TABLE> +<!-- end main navigation table --> +</TD></TR><TR><TD> +<!-- start secondary navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#BBBBBB width=100%> +<TR> +<TH><A HREF="start.html">Getting Started</A></TH> +<TH><A HREF="bindings.html">Special Bindings</A></TH> +<TH><A HREF="procs.html">Procedures</A></TH> +<TH><A HREF="demopic.png">Screenshot</A></TH> +</TR> +<TR> +<TH CLASS="hi2"><A HREF="dump.html" CLASS="hi2"><CODE>dump</CODE></A></TH> +<TH><A HREF="tkcon.html"><CODE>tkcon</CODE></A></TH> +<TH><A HREF="idebug.html"><CODE>idebug</CODE></A></TH> +<TH><A HREF="observe.html"><CODE>observe</CODE></A></TH> +</TR> +</TABLE> +<!-- end secondary navigation table --> +</TD></TR><TR><TD BGCOLOR=#FFFFFF> +<DIV CLASS="indent"> + <P> +The <CODE>dump</CODE> command provides a way for the user to spit out +state information about the interpreter in a Tcl readable (and human +readable) form. It takes the general form: + +<BLOCKQUOTE> +<code>dump</code> <b>method</b> <i>?-nocomplain? ?-filter pattern? ?--? +pattern ?pattern ...?</i> +</BLOCKQUOTE> + +The patterns represent glob-style patterns (as in <code>string match pattern +$str</code>). <i>-nocomplain</i> will prevent <code>dump</code> from +throwing an error if no items matched the pattern. <i>-filter</i> is +interpreted as appropriate for the method. The various methods are: + +<DL> + +<DT> <CODE>dump <b>command</b></CODE> <i>args</i> +<DD> Outputs one or more commands. + +<DT> <CODE>dump <b>procedure</b></CODE> <i>args</i> +<DD> Outputs one or more procs in sourceable form. + +<DT> <CODE>dump <b>variable</b></CODE> <i>args</i> +<DD> Outputs the values of variables in sourceable form. Recognizes nested +arrays. The <i>-filter</i> pattern is used as to filter array element +names and is interepreted as a glob pattern (defaults to {*}). +It is passed down for nested arrays. + +<DT> <CODE>dump <b>widget</b></CODE> <i>args</i> +<DD> Outputs one or more widgets by giving their configuration options. +The <i>-filter</i> pattern is used as to filter the config options and +is interpreted as a case insensitive regexp pattern (defaults to {.*}) + +</DL> +</DIV> +</TD></TR></TABLE> + +<HR NOSHADE SIZE=1> +<ADDRESS><FONT SIZE=2>© Jeffrey Hobbs</FONT></ADDRESS> + +</BODY> +</HTML> diff --git a/tkcon/docs/dump.n.man b/tkcon/docs/dump.n.man new file mode 100644 index 0000000..9dbccdb --- /dev/null +++ b/tkcon/docs/dump.n.man @@ -0,0 +1,60 @@ +[comment {-*- tcl -*- dump manpage}] +[manpage_begin dump n 2.5] +[copyright {Jeffrey Hobbs <jeff at hobbs.org>}] +[moddesc {TkCon}] +[titledesc {Dump information about Tcl interpreter in TkCon}] + +[description] +[para] +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. +It takes the general form: + +[list_begin definitions] + +[call [cmd dump] [arg method]\ + [opt [arg -nocomplain]]\ + [opt [arg "-filter pattern"]]\ + [opt [cmd --]]\ + [arg pattern]\ + [opt [arg "pattern ..."]]] + +[list_end] + +[para] +The patterns represent glob-style patterns (as in [cmd string] [arg {match pattern $str}]). +[arg -nocomplain] will prevent dump from throwing an error if no items +matched the pattern. +[arg -filter] is interpreted as appropriate for the method. +The various methods are: + +[list_begin definitions] + +[def "[cmd dump] [arg command] [arg args]"] +Outputs one or more commands. + +[def "[cmd dump] [arg procedure] [arg args]"] +Outputs one or more procs in sourceable form. + +[def "[cmd dump] [arg variable] [arg args]"] +Outputs the values of variables in sourceable form. +Recognizes nested arrays. +The -filter pattern is used as to filter array element +names and is interepreted as a glob pattern (defaults to {*}). +It is passed down for nested arrays. + +[def "[cmd dump] [arg widget] [arg args]"] +Outputs one or more widgets by giving their configuration options. +The -filter pattern is used as to filter the config options and +is interpreted as a case insensitive regexp pattern (defaults to {.*}). + +[list_end] + +[see_also [cmd tkcon](1)] +[see_also [cmd tkconrc](5) [cmd tkcon](n) [cmd idebug](n)] +[see_also [cmd observe](n)] +[keywords Tk console dump] + +[manpage_end] + diff --git a/tkcon/docs/idebug.html b/tkcon/docs/idebug.html new file mode 100755 index 0000000..8a98ec1 --- /dev/null +++ b/tkcon/docs/idebug.html @@ -0,0 +1,125 @@ +<HTML> +<HEAD> +<TITLE>tkcon: idebug procedure</TITLE> +<LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css"> +</HEAD> + +<BODY BGCOLOR=#FFFFFF> + +<TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD> +<!-- start header info --> +<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF> +<TR> +<TH><FONT SIZE=+3>tkcon: <CODE>idebug</CODE> procedure</FONT></TH> +<TD align=right> +<A href="http://tkcon.sourceforge.net/"> +<IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88" +height="31" border="0" alt="SourceForge Logo"></A> +</TD> +</TR> +</TABLE> +<!-- end header info --> + +</TD></TR><TR><TD> +<!-- start main navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> +<TR> +<TH CLASS="hi"><A HREF="index.html" CLASS="hi">Documentation</A></TH> +<TH><A HREF="purpose.html">Purpose & Features</A></TH> +<TH><A HREF="limits.html">Limitations</A></TH> +<TH><A HREF="todo.html">To Do</A></TH> +<TH><A HREF="license.terms">License</A></TH> +</TR><TR> +<TH COLSPAN=2><A HREF="plugin.html">Online Demo</A> +(requires <A HREF="http://tcl.activestate.com/software/plugin/">Tk plugin</A>)</TH> +<TH COLSPAN=3><A HREF="nontcl.html">Using TkCon with other Tk Languages</A></TH> +</TR> +</TABLE> +<!-- end main navigation table --> +</TD></TR><TR><TD> +<!-- start secondary navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#BBBBBB width=100%> +<TR> +<TH><A HREF="start.html">Getting Started</A></TH> +<TH><A HREF="bindings.html">Special Bindings</A></TH> +<TH><A HREF="procs.html">Procedures</A></TH> +<TH><A HREF="demopic.png">Screenshot</A></TH> +</TR> +<TR> +<TH><A HREF="dump.html"><CODE>dump</CODE></A></TH> +<TH><A HREF="tkcon.html"><CODE>tkcon</CODE></A></TH> +<TH CLASS="hi2"><A HREF="idebug.html" CLASS="hi2"><CODE>idebug</CODE></A></TH> +<TH><A HREF="observe.html"><CODE>observe</CODE></A></TH> +</TR> +</TABLE> +<!-- end secondary navigation table --> +</TD></TR><TR><TD BGCOLOR=#FFFFFF> +<DIV CLASS="indent"> + <P> +The <B>idebug</B> command provides an interactive debugging environment for +procedures via TkCon. You can place <code>idebug break</code> commands +into your procedure to create breakpoints. It will pop up the TkCon +console and put you into a "debugging" mode. The <code>body, show & +trace</code> methods are intended for internal use only. + <P> + +This procedure works for minimal debugging sessions. Comments are +encouraged. + +<DL> + +<DT> <CODE>idebug <b>body</b></CODE> <I>?level?</I> +<DD> Prints out the body of the command (if it is a procedure) at the +specified level. <i>level</i> defaults to the current level. + +<DT> <CODE>idebug <b>break</b></CODE> <I>?id?</I> +<DD> Creates a breakpoint within a procedure. This will only trigger if +idebug is on and the id matches the pattern. If so, TkCon will pop to the +front with the prompt changed to an idebug prompt. You are given the basic +ability to observe the call stack an query/set variables or execute Tcl +commands at any level. A separate history is maintained in debugging mode. +To see the special commands available at the debug prompt, type <B>?</B> +and hit return. + +<DT> <CODE>idebug {echo ?id?}</CODE> <I>?args?</I> +<DD> Behaves just like <code>echo</code>, but only triggers when idebug is +on. You can specify an optional id to further restrict triggering. If no +id is specified, it defaults to the name of the command in which the call +was made. + +<DT> <CODE>idebug <b>id</b></CODE> <I>?id?</I> +<DD> Query or set the idebug id. This id is used by other idebug methods +to determine if they should trigger or not. The idebug id can be a glob +pattern and defaults to *. + +<DT> <CODE>idebug <b>off</b></CODE> +<DD> Turns idebug off. + +<DT> <CODE>idebug <b>on</b></CODE> <I>?id?</I> +<DD> Turns idebug on. If <i>id</i> is specified, it sets the id to it. + +<DT> <CODE>idebug {puts ?id?}</CODE> <I>args</I> +<DD> Behaves just like <code>puts</code>, but only triggers when idebug is +on. You can specify an optional id to further restrict triggering. If no +id is specified, it defaults to the name of the command in which the call +was made. + +<DT> <CODE>idebug <b>show</b></CODE> <I>type ?level? ?VERBOSE?</I> +<DD> <i>type</i> must be one of vars, locals or globals. This method +will output the variables/locals/globals present in a particular level. +If VERBOSE is added, then it actually 'dump's out the values as well. +<i>level</i> defaults to the level in which this method was called. + +<DT> <CODE>idebug <b>trace</b></CODE> <I>?level?</I> +<DD> Prints out the stack trace from the specified level up to the top +level. <i>level</i> defaults to the current level. + +</DL> +</DIV> +</TD></TR></TABLE> + +<HR NOSHADE SIZE=1> +<ADDRESS><FONT SIZE=2>© Jeffrey Hobbs</FONT></ADDRESS> + +</BODY> +</HTML> diff --git a/tkcon/docs/idebug.n.man b/tkcon/docs/idebug.n.man new file mode 100644 index 0000000..1547081 --- /dev/null +++ b/tkcon/docs/idebug.n.man @@ -0,0 +1,83 @@ +[comment {-*- tcl -*- idebug manpage}] +[manpage_begin idebug n 2.5] +[copyright {Jeffrey Hobbs <jeff at hobbs.org>}] +[moddesc {TkCon}] +[titledesc {Interactive debugging environment in TkCon}] + +[description] +[para] +The idebug command provides an interactive debugging +environment for procedures via TkCon. +You can place idebug break commands into your procedure +to create breakpoints. +It will pop up the TkCon console and put you into a +"debugging" mode. +The [arg body], [arg show] & [arg trace] methods are +intended for internal use only. + +This procedure works for minimal debugging sessions. +Comments are encouraged. + +[list_begin definitions] + +[call [cmd idebug] [arg body] [opt [arg level]]] +Prints out the body of the command (if it is a procedure) +at the specified level. +level defaults to the current level. + +[call [cmd idebug] [arg break] [opt [arg id]]] +Creates a breakpoint within a procedure. +This will only trigger if idebug is on and the [arg id] matches the pattern. +If so, TkCon will pop to the front with the prompt changed +to an idebug prompt. +You are given the basic ability to observe the call stack +an query/set variables or execute Tcl commands at any level. +A separate history is maintained in debugging mode. +To see the special commands available at the debug prompt, +type ? and hit return. + +[call [cmd idebug] \{[arg "[arg echo] [opt [arg id]]"]\} [opt [arg args]]] +Behaves just like [cmd echo], but only triggers when idebug is on. +You can specify an optional [arg id] to further restrict triggering. +If no id is specified, it defaults to the name of the command +in which the call was made. + +[call [cmd idebug] [arg id] [opt [arg id]]] +Query or set the idebug id. +This id is used by other idebug methods to determine if +they should trigger or not. +The idebug id can be a glob pattern and defaults to *. + +[call [cmd idebug] [arg off]] +Turns idebug off. + +[call [cmd idebug] [arg on] [opt [arg id]]] +Turns idebug on. +If [arg id] is specified, it sets the id to it. + +[call [cmd idebug] \{[arg "[arg puts] [opt [arg id]]"]\} [arg args]] +Behaves just like [cmd puts], but only triggers when idebug is on. +You can specify an optional [arg id] to further restrict triggering. +If no id is specified, it defaults to the name of the +command in which the call was made. + +[call [cmd idebug] [arg show] [arg type] [opt [arg level]] [opt [arg VERBOSE]]] +type must be one of vars, locals or globals. +This method will output the variables/locals/globals present +in a particular level. +If [arg VERBOSE] is added, then it actually [cmd dump]s out the values as well. +level defaults to the level in which this method was called. + +[call [cmd idebug] [arg trace] [opt [arg level]]] +Prints out the stack trace from the specified level up to the top level. +level defaults to the current level. + +[list_end] + +[see_also [cmd tkcon](1)] +[see_also [cmd tkconrc](5) [cmd tkcon](n) [cmd dump](n)] +[see_also [cmd observe](n)] +[keywords Tk console debug] + +[manpage_end] + diff --git a/tkcon/docs/index.html b/tkcon/docs/index.html new file mode 100755 index 0000000..9d4709b --- /dev/null +++ b/tkcon/docs/index.html @@ -0,0 +1,81 @@ +<HTML> +<HEAD> +<TITLE>tkcon: Documentation</TITLE> +<LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css"> +</HEAD> + +<BODY BGCOLOR=#FFFFFF> + +<TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD> +<!-- start header info --> +<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF> +<TR> +<TD><FONT SIZE=+3><B>tkcon Documentation</B> (June 2001)</FONT></TD> +<TD align=right> +<A href="http://tkcon.sourceforge.net/"> +<IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88" +height="31" border="0" alt="SourceForge Logo"></A> +</TD> +</TR> +</TABLE> +<!-- end header info --> + +</TD></TR><TR><TD> +<!-- start main navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> +<TR> +<TH CLASS="hi"><A HREF="index.html" CLASS="hi">Documentation</A></TH> +<TH><A HREF="purpose.html">Purpose & Features</A></TH> +<TH><A HREF="limits.html">Limitations</A></TH> +<TH><A HREF="todo.html">To Do</A></TH> +<TH><A HREF="license.terms">License</A></TH> +</TR><TR> +<TH COLSPAN=2><A HREF="plugin.html">Online Demo</A> +(requires <A HREF="http://tcl.activestate.com/software/plugin/">Tk plugin</A>)</TH> +<TH COLSPAN=3><A HREF="nontcl.html">Using TkCon with other Tk Languages</A></TH> +</TR> +</TABLE> +<!-- end main navigation table --> + +</TD></TR><TR><TD BGCOLOR=#FFFFFF> +<DIV CLASS="indent"> + +<!-- +<H4><A HREF="ftp://tkcon.sourceforge.net/pub/tkcon/">Release Archives</A> (ftp)</H4> +--> + +<H4><A +HREF="http://sourceforge.net/project/showfiles.php?group_id=11462">Release +Archives</A> (high speed server)</H4> + +<H4><A HREF="demopic.png">Screenshot</A></H4> + +Please <B>read the following pages carefully</B> to fully understand the +features AND limitations of TkCon. I'm always open to suggestions for +improvement. + <P> +</DIV> +</TD></TR><TR><TD> + +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> +<TR> +<TH><A HREF="start.html">Getting Started</A></TD> +<TH><A HREF="bindings.html">Special Bindings</A></TH> +<TH><A HREF="procs.html">tkcon Procedures</A></TH> +<TH><A HREF="demopic.png">Screenshot</A></TH> +</TR> +<TR> +<TH><A HREF="dump.html"><CODE>dump</CODE> proc</A></TH> +<TH><A HREF="tkcon.html"><CODE>tkcon</CODE> proc</A></TH> +<TH><A HREF="idebug.html"><CODE>idebug</CODE> proc</A></TH> +<TH><A HREF="observe.html"><CODE>observe</CODE> proc</A></TH> +</TR> +</TABLE> + +</TD></TR></TABLE> + +<HR NOSHADE SIZE=1> +<ADDRESS><FONT SIZE=2>© Jeffrey Hobbs</FONT></ADDRESS> + +</BODY> +</HTML> diff --git a/tkcon/docs/license.terms b/tkcon/docs/license.terms new file mode 100755 index 0000000..5b757ba --- /dev/null +++ b/tkcon/docs/license.terms @@ -0,0 +1,33 @@ + * COPYRIGHT AND LICENSE TERMS * + +This software is copyrighted by Jeffrey Hobbs <jeff and hobbs org>. The +following terms apply to all files associated with the software unless +explicitly disclaimed in individual files. + +The authors hereby grant permission to use, copy, modify, distribute, and +license this software and its documentation for any purpose, provided that +existing copyright notices are retained in all copies and that this notice +is included verbatim in any distributions. No written agreement, license, +or royalty fee is required for any of the authorized uses. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR +DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT +OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, +EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS +PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO +OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +MODIFICATIONS. + +SPECIAL NOTES: + +This software is also falls under the bourbon_ware clause v2: + + This software is free, but should you find this software useful in your + daily work and would like to compensate the author, donations in the form + of aged bourbon and scotch are welcome by the author. The user may feel + exempt from this clause if they are below drinking age or think the author + has already partaken of too many drinks. diff --git a/tkcon/docs/limits.html b/tkcon/docs/limits.html new file mode 100755 index 0000000..072501d --- /dev/null +++ b/tkcon/docs/limits.html @@ -0,0 +1,76 @@ +<HTML> +<HEAD> +<TITLE>tkcon: Limitations</TITLE> +<LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css"> +</HEAD> + +<BODY BGCOLOR=#FFFFFF> + +<TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD> +<!-- start header info --> +<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF> +<TR> +<TH><FONT SIZE=+3>tkcon: Limitations</FONT></TH> +<TD align=right> +<A href="http://tkcon.sourceforge.net/"> +<IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88" +height="31" border="0" alt="SourceForge Logo"></A> +</TD> +</TR> +</TABLE> +<!-- end header info --> + +</TD></TR><TR><TD> +<!-- start main navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> +<TR> +<TH><A HREF="index.html">Documentation</A></TH> +<TH><A HREF="purpose.html">Purpose & Features</A></TH> +<TH CLASS="hi"><A HREF="limits.html" CLASS="hi">Limitations</A></TH> +<TH><A HREF="todo.html">To Do</A></TH> +<TH><A HREF="license.terms">License</A></TH> +</TR><TR> +<TH COLSPAN=2><A HREF="plugin.html">Online Demo</A> +(requires <A HREF="http://www.tcl.tk/software/plugin/">Tk plugin</A>)</TH> +<TH COLSPAN=3><A HREF="nontcl.html">Using TkCon with other Tk Languages</A></TH> +</TR> +</TABLE> +<!-- end main navigation table --> + +</TD></TR><TR><TD BGCOLOR=#FFFFFF> +<DIV CLASS="indent"> +<H3>Limitations:</H3> + +TkCon requires Tk8.4+. Since TkCon is meant to behave like the original Tk +console, it does not separate itself from the environment (it does not use +send to function, except when attached to foreign Tk interpreters). This +means that it can be can be altered or destroyed by any sourced +applications, and it will respond to an application's 'exit' call by +exiting (by default, slave consoles will only close themselves instead of +exiting the entire TkCon environment). However, the widget tree of TkCon +is hidden from the user environment. + <P> + +Since TkCon is built for cross-platform capability, <font color=#FF0000>in +Unix/Windows environments it does not have tty/shell behavior</font>. This +means programs like <CODE>vi</CODE> and <CODE>less</CODE> (those that rely +on tty/shell settings) will not function appropriately (currently they may +hang TkCon). Programs like <CODE>ls</CODE> and <CODE>more</CODE> will just +spit output to the TkCon screen without any special control or formatting +(note that <CODE>ls</CODE> has been rewritten for TkCon). You also do not +get any job (process) control outside of what tcl normally can provide. +Currently there is no way to handle <CODE>stdin</CODE> input. + <P> + +When connecting to non-Tcl Tk interpreters (ie - PerlTk, SchemeTk, ...), +you must use the syntax of the target environment. See my +<A HREF="nontcl.html">notes on using other Tk-embedded languages</A> for +more info. +</DIV> +</TD></TR></TABLE> + +<HR NOSHADE SIZE=1> +<ADDRESS><FONT SIZE=2>© Jeffrey Hobbs</FONT></ADDRESS> + +</BODY> +</HTML> diff --git a/tkcon/docs/nontcl.html b/tkcon/docs/nontcl.html new file mode 100755 index 0000000..47dbbe9 --- /dev/null +++ b/tkcon/docs/nontcl.html @@ -0,0 +1,75 @@ +<HTML> +<HEAD> +<TITLE>tkcon for Non-Tcl Users</TITLE> +<LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css"> +</HEAD> + +<BODY BGCOLOR=#FFFFFF> + +<TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD> +<!-- start header info --> +<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF> +<TR> +<TH><FONT SIZE=+3>tkcon: Non-Tcl Usage</FONT></TH> +<TD align=right> +<A href="http://tkcon.sourceforge.net/"> +<IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88" +height="31" border="0" alt="SourceForge Logo"></A> +</TD> +</TR> +</TABLE> +<!-- end header info --> + +</TD></TR><TR><TD> +<!-- start main navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> +<TR> +<TH><A HREF="index.html">Documentation</A></TH> +<TH><A HREF="purpose.html">Purpose & Features</A></TH> +<TH><A HREF="limits.html">Limitations</A></TH> +<TH><A HREF="todo.html">To Do</A></TH> +<TH><A HREF="license.terms">License</A></TH> +</TR><TR> +<TH COLSPAN=2><A HREF="plugin.html">Online Demo</A> +(requires <A HREF="http://www.tcl.tk/software/plugin/">Tk plugin</A>)</TH> +<TH COLSPAN=3 CLASS="hi"><A HREF="nontcl.html" CLASS="hi">Using TkCon with other Tk Languages</A></TH> +</TR> +</TABLE> +<!-- end main navigation table --> + +</TD></TR><TR><TD BGCOLOR=#FFFFFF> +<DIV CLASS="indent"> +<I>This document is for those users who are trying to use TkCon with a +non-Tcl based Tk language (ie - SchemeTk, PerlTk, PythonTk...).</I> + <P> + +TkCon requires <A HREF="http://tcl.activestate.com/">Tcl/Tk 8.4+</A> to +run. However, it can attach to any language with Tk4+ +embedded into it with the use of the Tk 'send' command. I have been able +to succesfully talk to SchemeTk-3.0 and Perl/Tk. When using TkCon attached +to these interpreters, you must remember to talk to the connected +interpreter in its language. + <P> +I welcome further comments from users of Tk-embedded languages on their +experiences or ideas. Of course, you can always try to port TkCon in full +to your language. I'd like to see the results from any such efforts. + <P> + +<H3>Special Language Notes:</H3> + +<H4>Perl Tk</H4> + +Read the man page on Perl/Tk's send command. You have to define Tk::Receive +before it will work. +<A HREF="mailto:lusol@turkey.cc.lehigh.edu">Stephen Lidie +(lusol@Turkey.CC.Lehigh.EDU)</A> contributed +a <A HREF="perl.txt">companion Perl/Tk program</A> that does the trick with +some extras. +</DIV> +</TD></TR></TABLE> + +<HR NOSHADE SIZE=1> +<ADDRESS><FONT SIZE=2>© Jeffrey Hobbs</FONT></ADDRESS> + +</BODY> +</HTML> diff --git a/tkcon/docs/observe.html b/tkcon/docs/observe.html new file mode 100755 index 0000000..f597534 --- /dev/null +++ b/tkcon/docs/observe.html @@ -0,0 +1,104 @@ +<HTML> +<HEAD> +<TITLE>tkcon: observe procedure</TITLE> +<LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css"> +</HEAD> + +<BODY BGCOLOR=#FFFFFF> + +<TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD> +<!-- start header info --> +<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF> +<TR> +<TH><FONT SIZE=+3>tkcon: <CODE>observe</CODE> procedure</FONT></TH> +<TD align=right> +<A href="http://tkcon.sourceforge.net/"> +<IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88" +height="31" border="0" alt="SourceForge Logo"></A> +</TD> +</TR> +</TABLE> +<!-- end header info --> + +</TD></TR><TR><TD> +<!-- start main navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> +<TR> +<TH CLASS="hi"><A HREF="index.html" CLASS="hi">Documentation</A></TH> +<TH><A HREF="purpose.html">Purpose & Features</A></TH> +<TH><A HREF="limits.html">Limitations</A></TH> +<TH><A HREF="todo.html">To Do</A></TH> +<TH><A HREF="license.terms">License</A></TH> +</TR><TR> +<TH COLSPAN=2><A HREF="plugin.html">Online Demo</A> +(requires <A HREF="http://tcl.activestate.com/software/plugin/">Tk plugin</A>)</TH> +<TH COLSPAN=3><A HREF="nontcl.html">Using TkCon with other Tk Languages</A></TH> +</TR> +</TABLE> +<!-- end main navigation table --> +</TD></TR><TR><TD> +<!-- start secondary navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#BBBBBB width=100%> +<TR> +<TH><A HREF="start.html">Getting Started</A></TH> +<TH><A HREF="bindings.html">Special Bindings</A></TH> +<TH><A HREF="procs.html">Procedures</A></TH> +<TH><A HREF="demopic.png">Screenshot</A></TH> +</TR> +<TR> +<TH><A HREF="dump.html"><CODE>dump</CODE></A></TH> +<TH><A HREF="tkcon.html"><CODE>tkcon</CODE></A></TH> +<TH><A HREF="idebug.html"><CODE>idebug</CODE></A></TH> +<TH CLASS="hi2"><A HREF="observe.html" CLASS="hi2"><CODE>observe</CODE></A></TH> +</TR> +</TABLE> +<!-- end secondary navigation table --> +</TD></TR><TR><TD BGCOLOR=#FFFFFF> +<DIV CLASS="indent"> + <P> +This command provides runtime debugging output for variables and commands +without the need to edit your code. For variables, the underlying mechanism +uses <code>trace</code> and <code>dump var</code>. For commands, it renames +the observed procedure and uses a special wrapper procedure. <b><font +color="#FF0000">WARNING:</font></b> using this procedure after checkpointing +state will result in major problems if you clean state because the renamed +(true) commands will be lost. + <P> + +This procedure is experimental. Comments are encouraged. + +<DL> + +<DT> <CODE>observe <b>command</b></CODE> <I>cmdname ?maxlevel?</I> +<DD> This will create a wrapper command which prints out (using +<code>dump</code>) the call stack to the console. <i>maxlevel</i> +represents the maximum number of levels of the call stack which will be +printed (defaults to 4). + +<DT> <CODE>observe <b>cdelete</b></CODE> <I>cmdname</I> +<DD> Removes the wrapper around an observed command. + +<DT> <CODE>observe <b>cinfo</b></CODE> <I>cmdname</I> +<DD> Prints out useless info. + +<DT> <CODE>observe <b>variable</b></CODE> <I>varname operation ?args?</I> +<DD> Currently a wrapper around trace that uses <code>dump</code> to +print out the value of the named variable whenever the specified operation +on that variable occurs (must be read, write or unset). + +<DT> <CODE>observe <b>vdelete</b></CODE> <I>varname operation</I> +<DD> Deletes the trace wrapper around the named variable. + +<DT> <CODE>observe <b>vinfo</b></CODE> <I>varname</I> +<DD> Prints out trace info about the named variable. + +</DL> +</DIV> +</TD></TR></TABLE> + +<HR NOSHADE SIZE=1> +<ADDRESS><FONT SIZE=2>© +Jeffrey Hobbs</FONT></ADDRESS> + +</BODY> +</HTML> diff --git a/tkcon/docs/observe.n.man b/tkcon/docs/observe.n.man new file mode 100644 index 0000000..d9630ba --- /dev/null +++ b/tkcon/docs/observe.n.man @@ -0,0 +1,55 @@ +[comment {-*- tcl -*- observe manpage}] +[manpage_begin observe n 2.5] +[copyright {Jeffrey Hobbs <jeff at hobbs.org>}] +[moddesc {TkCon}] +[titledesc {Runtime debugging output in TkCon}] + +[description] +[para] +This command provides runtime debugging output for variables +and commands without the need to edit your code. +For variables, the underlying mechanism uses [cmd trace] and [cmd dump] var. +For commands, it renames the observed procedure and uses a +special wrapper procedure. +WARNING: using this procedure after checkpointing state will +result in major problems if you clean state because the +renamed (true) commands will be lost. + +[para] +This procedure is experimental. +Comments are encouraged. + +[list_begin definitions] + +[call [cmd observe] [arg command] [arg cmdname] [opt [arg maxlevel]]] +This will create a wrapper command which prints out (using [cmd dump]) +the call stack to the console. +maxlevel represents the maximum number of levels of the call +stack which will be printed (defaults to 4). + +[call [cmd observe] [arg cdelete] [arg cmdname]] +Removes the wrapper around an observed command. + +[call [cmd observe] [arg cinfo] [arg cmdname]] +Prints out useless info. + +[call [cmd observe] [arg variable] [arg varname] [arg operation] [opt [arg args]]] +Currently a wrapper around trace that uses [cmd dump] to print out +the value of the named variable whenever the specified +operation on that variable occurs (must be [arg read], [arg write] or [arg unset]). + +[call [cmd observe] [arg vdelete] [arg varname] [arg operation]] +Deletes the trace wrapper around the named variable. + +[call [cmd observe] [arg vinfo] [arg varname]] +Prints out trace info about the named variable. + +[list_end] + +[see_also [cmd tkcon](1)] +[see_also [cmd tkconrc](5) [cmd tkcon](n) [cmd dump](n)] +[see_also [cmd idebug](n)] +[keywords Tk console debug] + +[manpage_end] + diff --git a/tkcon/docs/perl.txt b/tkcon/docs/perl.txt new file mode 100755 index 0000000..37463b5 --- /dev/null +++ b/tkcon/docs/perl.txt @@ -0,0 +1,109 @@ +#!/usr/local/bin/perl -w + +# tkcon.pl - a Perl/Tk "shell" companion for tkcon.tcl. +# +# Variable $MW is an object reference to the main window, from which you can +# create and manipulate child widgets. Variable names beginning with an +# underscore are reserved for this application. +# +# Stephen O. Lidie, 96/08/25 + +require 5.002; +use English; +use Tk; +use Tk::Pretty qw(Pretty); +use Tk::Dialog; +use strict; +use subs qw(doit tkcon); +my($MW, $_TKCON, $_VERSION, $_HELP, $_SHELL, $_TAB, $_PARA, @_ERRORS, $_MES); + +tkcon; # main + +sub doit { + + # Eval some code without use strict constraints. + + my($code) = @ARG; + + { + no strict; + if ($_MES) { + $_MES->packForget; + $_MES->destroy; + $_MES = 0; + } + @_ERRORS = (); + $SIG{'__WARN__'} = sub {push @_ERRORS, @ARG}; + my $_res = eval $code; + push @_ERRORS, $EVAL_ERROR if $EVAL_ERROR; + push @_ERRORS, $_res; + } + +} # end doit + +sub tkcon { + + # Nothing fancy here, just create the main window and the help dialog + # object, and display a pointer to the help. + + $_TKCON = 'tkcon.pl'; + $_VERSION = '0.2'; + $_SHELL = '/bin/sh'; + $_SHELL = $ENV{'SHELL'} if $ENV{'SHELL'}; + $_TAB = 0; + $_PARA = ''; + + $MW = MainWindow->new; + $MW->title($_TKCON); + $MW->iconname($_TKCON); + $_HELP = $MW->Dialog( + -title => "$_TKCON Help", + -font => 'fixed', + -wraplength => '6i', + -justify => 'left', + -text => + "? - this text.\n" . + "| - pass arguments to your shell (default /bin/sh).\n" . + "p - use Tk::Pretty to \"pretty-print\" arguments.\n" . + "+ - a tab starts/stops multiline input mode.\n" . + "exit - quit $_TKCON.\n" . + "\nOther input is assumed to be a Perl/Tk command.\n" . + "\n\$MW is the MainWindow.\n", + ); + $_HELP->configure(-foreground => 'blue'); + $_MES = $MW->Label(-text => "\nEnter ? for help.\n")->pack; + MainLoop; + +} # end tkcon + +sub Tk::Receive { + + shift(); + $ARG = shift(); + if (/^\?(.*)/) { # help + $_HELP->Show; + } elsif (/^\|(.*)/) { # bang + @_ERRORS = (); + push @_ERRORS, `$_SHELL -c $1 2>&1`; + } elsif (/^\+$/) { + $_TAB++; + if ($_TAB % 2) { + @_ERRORS = (); + $_PARA = ''; + push @_ERRORS, '+'; + } else { + doit $_PARA; + } + } else { # Perl/Tk command + $ARG = "Pretty($1)" if (/^p\s(.*)$/); + if ($_TAB % 2) { + $_PARA .= $ARG; + push @_ERRORS, '+'; + } else { + doit $ARG; + } + } # ifend + + return @_ERRORS; + +} # end Tk::Receive diff --git a/tkcon/docs/plugin.html b/tkcon/docs/plugin.html new file mode 100755 index 0000000..1cc1896 --- /dev/null +++ b/tkcon/docs/plugin.html @@ -0,0 +1,113 @@ +<HTML> +<HEAD> +<TITLE>tkcon: Tcl Plugin Stripped Demo</TITLE> +<LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css"> +</HEAD> + +<BODY> + +<TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD> +<!-- start header info --> +<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF> +<TR> +<TD><FONT SIZE=+3><B>tkcon Documentation</B> (May 2001)</FONT></TD> +<TD align=right> +<A href="http://tkcon.sourceforge.net/"> +<IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88" +height="31" border="0" alt="SourceForge Logo"></A> +</TD> +</TR> +</TABLE> +<!-- end header info --> + +</TD></TR><TR><TD> +<!-- start main navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> +<TR> +<TH><A HREF="index.html">Documentation</A></TH> +<TH><A HREF="purpose.html">Purpose & Features</A></TH> +<TH><A HREF="limits.html">Limitations</A></TH> +<TH><A HREF="todo.html">To Do</A></TH> +<TH><A HREF="license.terms">License</A></TH> +</TR><TR> +<TH COLSPAN=2 CLASS="hi"><A HREF="plugin.html" CLASS="hi">Online Demo</A> +(requires <A HREF="http://www.tcl.tk/software/plugin/">Tk plugin</A>)</TH> +<TH COLSPAN=3><A HREF="nontcl.html">Using TkCon with other Tk Languages</A></TH> +</TR> +</TABLE> +<!-- end main navigation table --> + +</TD></TR><TR><TD BGCOLOR=#FFFFFF> +<DIV CLASS="indent"> +<P> +This is the full tkcon script when run inside the plugin. It feels like a +stripped down version of tkcon, but the only limitations are those +established by the plugin. You can test the basic console features and get +a feel for the mutli-color output. Below the demo are some ideas to try +out. v2+ of the plugin is distributed with a megawidget version of tkcon for +debugging tclets. The demo below uses the CVS head of tkcon. + +<P> + <OBJECT + ID="PluginHostCtrl" + CLASSID="CLSID:14E78123-A693-4F27-B6EE-DDDE18F93D3A" + WIDTH="600" + HEIGHT="350" +> + <PARAM name="type" value="application/x-tcl"/> + <PARAM name="pluginspage" value="http://www.tcl.tk/software/plugin/"/> + <PARAM name="src" value="http://tkcon.cvs.sourceforge.net/tkcon/tkcon/tkcon.tcl?rev=HEAD&content-type=application/x-tcl"/> + + <EMBED + TYPE="application/x-tcl" + PLUGINSPAGE="http://www.tcl.tk/software/plugin/" + FRAMEBORDER="NO" + WIDTH="600" + HEIGHT="350" + SRC="http://tkcon.cvs.sourceforge.net/tkcon/tkcon/tkcon.tcl?rev=HEAD&content-type=application/x-tcl" + > + </EMBED> + </OBJECT> +</P> + +Have a look at some of the features: (culled from the +<A HREF="index.html">tkcon documentation</A>) +<UL> +<LI> <B>Variable / Path / Procedure Name Expansion.</B> Type in +<CODE>set tc</CODE> at the prompt. Hit <I><Control-Shift-V></I>. +<CODE>set tcl_</CODE> should now be visible. +Hit <I><Control-Shift-V></I> again. You should see the rest of +the completions printed out for you. Works the same for procedures +and files paths (file access restricted from plugin). Works properly +when spaces or other funny characters are including in the name. + +<LI> <B>Command Highlighting.</B> Note that <CODE>set</CODE> should be in +green, denoting it is a recognized command in that interpreter. + +<LI> <B>Electric Character Matching.</B> Watch while you type the +following: <CODE>proc foo { a b } { puts [list $a $b] }</CODE>. Did you +notice the blink matching of the braces? Yes, it's smart. + +<LI> <B>Command History.</B> Use the Up/Down arrows or +<I><Control-p></I>/<I><Control-n></I> to peruse the command +history. <I><Control-r></I>/<I><Control-s></I> Actually +does command history matching (like tcsh or other advanced Unix shells). + +<LI> <B>Useful Colorization.</B> Having defined <CODE>foo</CODE> above, type +in <CODE>foo hey</CODE>. Note that the error comes back in red. Go up one +in the command history and add <CODE> you</CODE> and see that regular +stdout output comes through in blue (the colors are configurable). + +<LI> <B>Cut/Copy/Paste.</B> You should be able to do that between outside +windows and TkCon. The default keys are +<I><Control-x></I>/<I><Control-c></I>/<I><Control-v></I>. + +</UL> +</DIV> +</TD></TR></TABLE> + +<HR NOSHADE SIZE=1> +<ADDRESS><FONT SIZE=2>© Jeffrey Hobbs</FONT></ADDRESS> + +</BODY> +</HTML> diff --git a/tkcon/docs/procs.html b/tkcon/docs/procs.html new file mode 100755 index 0000000..c2a0279 --- /dev/null +++ b/tkcon/docs/procs.html @@ -0,0 +1,167 @@ +<HTML> +<HEAD> +<TITLE>tkcon: Procedures</TITLE> +<LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css"> +</HEAD> + +<BODY BGCOLOR=#FFFFFF> + +<TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD> +<!-- start header info --> +<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF> +<TR> +<TH><FONT SIZE=+3>tkcon: Procedures</FONT></TH> +<TD align=right> +<A href="http://tkcon.sourceforge.net/"> +<IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88" +height="31" border="0" alt="SourceForge Logo"></A> +</TD> +</TR> +</TABLE> +<!-- end header info --> + +</TD></TR><TR><TD> +<!-- start main navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> +<TR> +<TH CLASS="hi"><A HREF="index.html" CLASS="hi">Documentation</A></TH> +<TH><A HREF="purpose.html">Purpose & Features</A></TH> +<TH><A HREF="limits.html">Limitations</A></TH> +<TH><A HREF="todo.html">To Do</A></TH> +<TH><A HREF="license.terms">License</A></TH> +</TR><TR> +<TH COLSPAN=2><A HREF="plugin.html">Online Demo</A> +(requires <A HREF="http://tcl.activestate.com/software/plugin/">Tk plugin</A>)</TH> +<TH COLSPAN=3><A HREF="nontcl.html">Using TkCon with other Tk Languages</A></TH> +</TR> +</TABLE> +<!-- end main navigation table --> +</TD></TR><TR><TD> +<!-- start secondary navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#BBBBBB width=100%> +<TR> +<TH><A HREF="start.html">Getting Started</A></TH> +<TH><A HREF="bindings.html">Special Bindings</A></TH> +<TH CLASS="hi2"><A HREF="procs.html" CLASS="hi2">Procedures</A></TH> +<TH><A HREF="demopic.png">Screenshot</A></TH> +</TR> +<TR> +<TH><A HREF="dump.html"><CODE>dump</CODE></A></TH> +<TH><A HREF="tkcon.html"><CODE>tkcon</CODE></A></TH> +<TH><A HREF="idebug.html"><CODE>idebug</CODE></A></TH> +<TH><A HREF="observe.html"><CODE>observe</CODE></A></TH> +</TR> +</TABLE> +<!-- end secondary navigation table --> +</TD></TR><TR><TD BGCOLOR=#FFFFFF> +<DIV CLASS="indent"> + <P> +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: + +<DL COMPACT> + +<DT> <B>alias</B> <I>?sourceCmd targetCmd ?arg arg ...??</I> +<DD> 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). +<font color=#FF0000>Don't delete those</font>. + +<DT> <B>clear</B> <I>?percentage?</I> +<DD> 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). + +<DT> <B>dir</B> <i>?-all? ?-full? ?-long? ?pattern pattern ...?</i> +<DD> Cheap way to get directory listings. Uses glob style pattern matching. + +<DT> <B>dump</B> <I>type ?-nocomplain? ?-filter pattern? ?--? +pattern ?pattern ...?</I> +<DD> The <CODE>dump</CODE> command provides a way for the user to spit out +state information about the interpreter in a Tcl readable (and human +readable) form. +See <a href="dump.html">further <B>dump</B> docs</a> for details. + +<DT> <B>echo</B> <I>?arg arg ...?</I> +<DD> Concatenates the args and spits the result to the console (stdout). + +<DT> <B>edit</B> <I>?-type type? ?-find str? ?-attach interp?</I> arg +<font size=-1 color=#990033>NEW in v1.4, still under construction</font> +<DD> Opens an editor with the data from <I>arg</I>. The optional <I>type</I> +argument can be one of: <I>proc</I>, <I>var</I> or <I>file</I>. For +proc or var, the <I>arg</I> may be a pattern. + +<DT> <B>idebug</B> <I>command ?args?</I> +<DD> Interactive debugging command. +See <a href="idebug.html">further <B>idebug</B> docs</a> for details. + +<DT> <B>lremove</B> <I>?-all? ?-regexp -glob? list items</I> +<DD> Removes one or more items from a list and returns the new list. If +<I>-all</I> is specified, it removes all instances of each item in the +list. If <I>-regexp</I> or <I>-glob</I> is specified, it interprets each +item in the items list as a regexp or glob pattern to match against. + +<DT> <B>less</B> +<DD> Aliased to <B>edit</B>. + +<DT> <B>ls</B> +<DD> Aliased to <B>dir -full</B>. + +<DT> <B>more</B> +<DD> Aliased to <B>edit</B>. + +<DT> <B>observe</B> <I>type ?args?</I> +<DD> This command provides passive runtime debugging output for variables +and commands. +See <a href="observe.html">further <B>observe</B> docs</a> for details. + +<DT> <B>puts</B> (same options as always) +<DD> Redefined to put the output into TkCon + +<DT> <B>tkcon</B> <I>method ?args?</I> +<DD> Multi-purpose command. +See <a href="tkcon.html">further <B>tkcon</B> docs</a> for details. + +<DT> <B>tclindex</B> <I>?-extensions patternlist? ?-index TCL_BOOLEAN? +?-package TCL_BOOLEAN? ?dir1 dir2 ...?</I> +<DD> 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. + +<DT> <B>unalias</B> <I>cmd</I> +<DD> unaliases command + +<DT> <B>what</B> <i>string</i> +<DD> The <CODE>what</CODE> command will identify the word given in +<i>string</i> 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 <CODE>dump</CODE> and <CODE>which</CODE>. + +<DT> <B>which</B> <i>command</i> +<DD> 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. + +</DL> + +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). +</DIV> +</TD></TR></TABLE> + +<HR NOSHADE SIZE=1> +<ADDRESS><FONT SIZE=2>© +Jeffrey Hobbs</FONT></ADDRESS> + +</BODY> +</HTML> diff --git a/tkcon/docs/purpose.html b/tkcon/docs/purpose.html new file mode 100755 index 0000000..1d5a087 --- /dev/null +++ b/tkcon/docs/purpose.html @@ -0,0 +1,87 @@ +<HTML> +<HEAD> +<TITLE>tkcon: Purpose & Features</TITLE> +<LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css"> +</HEAD> + +<BODY BGCOLOR=#FFFFFF> + +<TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD> +<!-- start header info --> +<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF> +<TR> +<TD><FONT SIZE=+3><B>tkcon: Purpose & Features</B></FONT></TD> +<TD align=right> +<A href="http://tkcon.sourceforge.net/"> +<IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88" +height="31" border="0" alt="SourceForge Logo"></A> +</TD> +</TR> +</TABLE> +<!-- end header info --> + +</TD></TR><TR><TD> +<!-- start main navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> +<TR> +<TH><A HREF="index.html">Documentation</A></TH> +<TH CLASS="hi"><A HREF="purpose.html" CLASS="hi">Purpose & Features</A></TH> +<TH><A HREF="limits.html">Limitations</A></TH> +<TH><A HREF="todo.html">To Do</A></TH> +<TH><A HREF="license.terms">License</A></TH> +</TR><TR> +<TH COLSPAN=2><A HREF="plugin.html">Online Demo</A> +(requires <A HREF="http://tcl.activestate.com/software/plugin/">Tk plugin</A>)</TH> +<TH COLSPAN=3><A HREF="nontcl.html">Using TkCon with other Tk Languages</A></TH> +</TR> +</TABLE> +<!-- end main navigation table --> + +</TD></TR><TR><TD BGCOLOR=#FFFFFF> +<DIV CLASS="indent"> + +<H3>Purpose:</H3> + +tkcon is a replacement for the standard console that comes with Tk (on +Windows/Mac, but also works on Unix). The console itself provides +<i>many</i> more features than the standard console. tkcon works on all +platforms where Tcl/Tk is available. It is meant primarily to aid one when +working with the little details inside tcl and tk, giving Unix users the GUI +console provided by default in the Mac and Windows Tk. It's also not a bad +replacement for the default MS-DOS shell (although it needs lots of fine +tuning). + <P> +See <A HREF="limits.html">Limitations</A> for a good idea of what +tkcon <B>can't</B> do for you. + +<H3>Features:</H3> + +Just in case you don't run across them while playing, here are some of the +extras in tkcon: +<UL> +<LI> Command history +<LI> Path (Unix style) / Proc / Variable name expansion +<LI> Multiple consoles, each with its own state (via multiple interpreters) +<LI> Captures <CODE>stdout</CODE> and <CODE>stderr</CODE> to console window +<LI> Electric character matching (a la emacs) +<LI> Electric proc highlighting +<LI> Enhanced history searching +<LI> Configurable +<LI> Cut / Copy / Paste between windows +<LI> Communication between consoles and other Tk interpreters (including +non-tcl ones) +<LI> Hot Errors (click on error result to see stack trace) +<LI> Works on all Tk platforms +</UL> + +Read the <A HREF="index.html">documentation</A> for how to take advantage +of these features. +</DIV> +</TD></TR></TABLE> + +<HR NOSHADE SIZE=1> +<ADDRESS><FONT SIZE=2>© +Jeffrey Hobbs</FONT></ADDRESS> + +</BODY> +</HTML> diff --git a/tkcon/docs/start.html b/tkcon/docs/start.html new file mode 100755 index 0000000..5cc9808 --- /dev/null +++ b/tkcon/docs/start.html @@ -0,0 +1,358 @@ +<HTML> +<HEAD> +<TITLE>tkcon: Getting Started</TITLE> +<LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css"> +</HEAD> + +<BODY BGCOLOR=#FFFFFF> + +<TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD> +<!-- start header info --> +<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF> +<TR> +<TH><FONT SIZE=+3>tkcon: Getting Started</FONT></TH> +<TD align=right> +<A href="http://tkcon.sourceforge.net/"> +<IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88" +height="31" border="0" alt="SourceForge Logo"></A> +</TD> +</TR> +</TABLE> +<!-- end header info --> + +</TD></TR><TR><TD> +<!-- start main navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> +<TR> +<TH CLASS="hi"><A HREF="index.html" CLASS="hi">Documentation</A></TH> +<TH><A HREF="purpose.html">Purpose & Features</A></TH> +<TH><A HREF="limits.html">Limitations</A></TH> +<TH><A HREF="todo.html">To Do</A></TH> +<TH><A HREF="license.terms">License</A></TH> +</TR><TR> +<TH COLSPAN=2><A HREF="plugin.html">Online Demo</A> +(requires <A HREF="http://tcl.activestate.com/software/plugin/">Tk plugin</A>)</TH> +<TH COLSPAN=3><A HREF="nontcl.html">Using TkCon with other Tk Languages</A></TH> +</TR> +</TABLE> +<!-- end main navigation table --> +</TD></TR><TR><TD> +<!-- start secondary navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#BBBBBB width=100%> +<TR> +<TH CLASS="hi2"><A HREF="start.html" CLASS="hi2">Getting Started</A></TH> +<TH><A HREF="bindings.html">Special Bindings</A></TH> +<TH><A HREF="procs.html">Procedures</A></TH> +<TH><A HREF="demopic.png">Screenshot</A></TH> +</TR> +<TR> +<TH><A HREF="dump.html"><CODE>dump</CODE></A></TH> +<TH><A HREF="tkcon.html"><CODE>tkcon</CODE></A></TH> +<TH><A HREF="idebug.html"><CODE>idebug</CODE></A></TH> +<TH><A HREF="observe.html"><CODE>observe</CODE></A></TH> +</TR> +</TABLE> +<!-- end secondary navigation table --> +</TD></TR><TR><TD BGCOLOR=#FFFFFF> +<DIV CLASS="indent"> +<H3>Resource File:</H3> + +TkCon will search for a resource file in "<CODE>$env(HOME)/.tkconrc</CODE>" +(Unix), "<CODE>$env(HOME)/tkcon.cfg</CODE>" (Windows) or +"<CODE>$env(PREF_FOLDER)/tkcon.cfg</CODE>" (Macintosh). On DOS machines, +"<CODE>$env(HOME)</CODE>" usually refers to "<CODE>C:\</CODE>". TkCon +never sources the "<CODE>~/.wishrc</CODE>" file. The resource file is +sourced by each new instance of the console. An example resource file is +provided below. + +<H3>Command Line Arguments</H3> + +Except for <CODE>-rcfile</CODE>, command line arguments are handled after +the TkCon resource file is sourced, but before the slave interpreter or the +TkCon user interface is initialized. <CODE>-rcfile</CODE> is handled right +before it would be sourced, allowing you to specify any alternate file. +Command line arguments are passed to each new console and will be evaluated +by each. To prevent this from happening, you have to say +<CODE>tkcon main set argv {}; tkcon main set argc 0</CODE>. + <P> +For these options, any unique substring is allowed. + +<DL> + +<DT> <CODE>-argv</CODE> (also <CODE>--</CODE>) +<DD> Causes TkCon to stop evaluating arguments and set the remaining args to +be argv/argc (with <CODE>--</CODE> prepended). This carries over for any +further consoles. This is meant only for wrapping TkCon around programs +that require their own arguments. + +<DT> <CODE>-color-<color></CODE> <I>color</I> +<DD> Sets the requested color type to the specified color for tkcon. +See the <B>Variables</B> section for the recognized +<i><color></i> names. + +<DT> <CODE>-eval</CODE> (also <CODE>-main</CODE> or <CODE>-e</CODE>) +<DD> A tcl script to eval in each main interpreter. This is evaluated +after the resource file is loaded and the slave interpreter is created. +Multiple <CODE>-eval</CODE> switches will be recognized (in order). + +<DT> <CODE>-exec</CODE> <I>slavename</I> +<DD> Sets the named slave that tkcon operates in. In general, this is only +useful to set to "" (empty), indicating to tkcon to avoid the +multi-interpreter model and operate in the main environment. When this is +empty, any further arguments will be only used in the first tkcon console +and not passed onto further new consoles. This is useful when using tkcon +as a console for extended wish executables that don't load there commands +into slave interpreters. + +<DT> <CODE>-font</CODE> <I>font</I> +<DD> Sets the font that tkcon uses for its text windows. If this isn't +a fixed width font, tkcon will override it. + +<DT> <CODE>-nontcl</CODE> <I>TCL_BOOLEAN</I> +<DD> Sets <CODE>::tkcon::OPT(nontcl)</CODE> to <I>TCL_BOOLEAN</I>. Needed +when attaching to non-Tcl interpreters. + +<DT> <CODE>-package</CODE> <I>package_name</I> (also <CODE>-load</CODE>) +<DD> Packages to automatically load into the slave interpreters (ie - "Tk"). + +<DT> <CODE>-rcfile</CODE> <I>filename</I> +<DD> Specify an alternate tkcon resource file name. + +<DT> <CODE>-root</CODE> <I>widgetname</I> +<DD> Makes the named widget the root name of all consoles (ie - .tkcon). + +<DT> <CODE>-slave</CODE> <I>tcl_script</I> +<DD> A tcl script to eval in each slave interpreter. This will append +the one specified in the tkcon resource file, if any. + +</DL> + +Some examples of tkcon command line startup situations: +<DL> + +<DT> <CODE>megawish tkcon.tcl -exec "" -root .tkcon mainfile.tcl</CODE> +<DD> Use tkcon as a console for your megawish application. You can avoid +starting the line with <CODE>megawish</CODE> if that is the default wish +that tkcon would use. The <CODE>-root</CODE> ensures that tkcon will not +conflict with the + +<DT> <CODE>tkcon.tcl -font "Courier 12" -load Tk</CODE> +<DD> Use the courier font for tkcon and always load Tk in slave +interpreters at startup. + +<DT> <CODE>tkcon.tcl -rcfile ~/.wishrc -color,bg white</CODE> +<DD> Use the <CODE>~/.wishrc</CODE> file as the resource file, and +a white background for tkcon's text widgets. + +</DL> + +<H3>Variables:</H3> + +Certain variables in TkCon can be modified to suit your needs. It's +easiest to do this in the resource file, but you can do it when time the +program is running (and some can be changed via the Prefs menu). All these +are part of the master interpreter's <code>::tkcon</code> namespace. The +modifiable array variables are <CODE>::tkcon::COLOR</CODE> and +<CODE>::tkcon::OPT</CODE>. You can call '<CODE>tkcon set +::tkcon::COLOR</CODE>' when the program is running to check its state. +Here is an explanation of certain variables you might change or use: + +<DL> + +<DT> <CODE>::tkcon::COLOR(bg)</CODE> +<DD> The background color for tkcon text widgets. +Defaults to the operating system default (determined at startup). + +<DT> <CODE>::tkcon::COLOR(blink)</CODE> +<DD> The background color of the electric brace highlighting, if on. +Defaults to <font color=#FFFF00>yellow</font>. + +<DT> <CODE>::tkcon::COLOR(cursor)</CODE> +<DD> The background color for the insertion cursor in tkcon. +Defaults to <font color=#000000>black</font>. + +<DT> <CODE>::tkcon::COLOR(disabled)</CODE> +<DD> The foreground color for disabled menu items. +Defaults to <font color=#4D4D4D>dark grey</font>. + +<DT> <CODE>::tkcon::COLOR(proc)</CODE> +<DD> The foreground color of a recognized proc, if command highlighting is on. +Defaults to <font color=#008800>dark green</font>. + +<DT> <CODE>::tkcon::COLOR(var)</CODE> +<DD> The background color of a recognized var, if command highlighting is on. +Defaults to <font color=#FFC0D0>pink</font>. + +<DT> <CODE>::tkcon::COLOR(prompt)</CODE> +<DD> The foreground color of the prompt as output in the console. +Defaults to <font color=#8F4433>brown</font>. + +<DT> <CODE>::tkcon::COLOR(stdin)</CODE> +<DD> The foreground color of the stdin for the console. +Defaults to <font color=#000000>black</font>. + +<DT> <CODE>::tkcon::COLOR(stdout)</CODE> +<DD> The foreground color of the stdout as output in the console. +Defaults to <font color=#0000FF>blue</font>. + +<DT> <CODE>::tkcon::COLOR(stderr)</CODE> +<DD> The foreground color of stderr as output in the console. +Defaults to <font color=#FF0000>red</font>. + <P> + +<DT> <CODE>::tkcon::OPT(autoload)</CODE> +<DD> Packages to automatically load into the slave interpreter (ie - 'Tk'). +This is a list. Defaults to {} (none). + +<DT> <CODE>::tkcon::OPT(blinktime)</CODE> +<DD> The amount of time (in millisecs) that braced sections should +<I>blink</I> for. Defaults to 500 (.5 secs), must be at least 100. + +<DT> <CODE>::tkcon::OPT(blinkrange)</CODE> +<DD> Whether to blink the entire range for electric brace matching or to +just blink the actual matching braces (respectively 1 or 0, defaults to 1). + +<DT> <CODE>::tkcon::OPT(buffer)</CODE> +<DD> The size of the console scroll buffer (in lines). +Defaults to 512. + +<DT> <CODE>::tkcon::OPT(calcmode)</CODE> +<DD> Whether to allow <CODE>expr</CODE> commands to be run at the command +line without prefixing them with <CODE>expr</CODE> (just a convenience). + +<DT> <CODE>::tkcon::OPT(cols)</CODE> +<DD> Number of columns for the console to start out with. Defaults to 80. + +<DT> <CODE>::tkcon::OPT(dead)</CODE> +<DD> What to do with dead connected interpreters. If <CODE>dead</CODE> +is <i>leave</i>, TkCon automatically exits the dead interpreter. If +<CODE>dead</CODE> is <i>ignore</i> then it remains attached waiting for +the interpreter to reappear. Otherwise TkCon will prompt you. + +<DT> <CODE>::tkcon::OPT(exec)</CODE> +<DD> This corresponds to the <CODE>-exec</CODE> option above + +<DT> <CODE>::tkcon::OPT(font)</CODE> +<DD> Font to use for tkcon text widgets (also specified with -font). +Defaults to the system default, or a fixed width equivalent. + +<DT> <CODE>::tkcon::OPT(gets)</CODE> +<DD> Controls whether tkcon will overload the gets command to work with +tkcon. The valid values are: <code>congets</code> (the default), which +will redirect <code>stdin</code> requests to the tkcon window; +<code>gets</code>, which will pop up a dialog to get input; and {} (empty +string) which tells tkcon not to overload gets. This value must be set at +startup to alter tkcon's behavior. + +<DT> <CODE>::tkcon::OPT(history)</CODE> +<DD> The size of the history list to keep. Defaults to 48. + +<DT> <CODE>::tkcon::OPT(hoterrors)</CODE> +<DD> Whether hot errors are enabled or not. When enabled, errors that +are returned to the console are marked with a link to the error info +that will pop up in an minimal editor. This requires more memory because +each error that occurs will maintain bindings for this feature, as long +as the error is in the text widget. Defaults to on. + +<DT> <CODE>::tkcon::OPT(library)</CODE> +<DD> The path to any tcl library directories (these are appended to the +auto_path when the after the resource file is loaded in). + +<DT> <CODE>::tkcon::OPT(lightbrace)</CODE> +<DD> Whether to use the brace highlighting feature or not +(respectively 1 or 0, defaults to 1). + +<DT> <CODE>::tkcon::OPT(lightcmd)</CODE> +<DD> Whether to use the command highlighting feature or not +(respectively 1 or 0, defaults to 1). + +<DT> <CODE>::tkcon::OPT(maineval)</CODE> +<DD> A tcl script to execute in the main interpreter after the slave +interpreter is created and the user interface is initialized. + +<DT> <CODE>::tkcon::OPT(maxlinelen)</CODE> +<DD> A number that specifies the limit of long result lines. +True result is still captured in $_ (and 'puts $_' works). +Defaults to 0 (unlimited). + +<DT> <CODE>::tkcon::OPT(maxmenu)</CODE> +<DD> A number that specifies the maximum number of packages to show +vertically in the Interp->Packages menu before breaking into +another column. Defaults to 15. + +<DT> <CODE>::tkcon::OPT(nontcl)</CODE> +<DD> For those who might be using non-Tcl based Tk attachments, set this +to 1. It prevents TkCon from trying to evaluate its own Tcl code in an +attached interpreter. Also see my <A HREF="nontcl.html">notes for non-Tcl +based Tk interpreters</A>. + +<DT> <CODE>::tkcon::OPT(prompt1)</CODE> +<DD> Like tcl_prompt1, except it doesn't require you use '<CODE>puts</CODE>'. +No equivalent for tcl_prompt2 is available (it's unnecessary IMHO). +<BR>Defaults to {([file tail [pwd]]) [history nextid] % }. + +<DT> <CODE>::tkcon::OPT(rows)</CODE> +<DD> Number of rows for the console to start out with. Defaults to 20. + +<DT> <CODE>::tkcon::OPT(scollypos)</CODE> +<DD> Y scrollbar position. Valid values are <CODE>left</CODE> or +<CODE>right</CODE>. Defaults to <CODE>left</CODE>. + +<DT> <CODE>::tkcon::OPT(showmenu)</CODE> +<DD> Show the menubar on startup (1 or 0, defaults to 1). + +<DT> <CODE>::tkcon::OPT(showmultiple)</CODE> +<DD> Show multiple matches for path/proc/var name expansion +(1 or 0, defaults to 1). + +<DT> <CODE>::tkcon::OPT(slaveeval)</CODE> +<DD> A tcl script to execute in each slave interpreter right after it's +created. This allows the user to have user defined info always available +in a slave. Example: +<PRE> set ::tkcon::OPT(slaveeval) { + proc foo args { puts $args } + lappend auto_path . + }</PRE> + +<DT> <CODE>::tkcon::OPT(slaveexit)</CODE> +<DD> Allows the prevention of <CODE>exit</CODE> in slaves from exitting +the entire application. If it is equal to <CODE>exit</CODE>, exit will +exit as usual, otherwise it will just close down that interpreter (and +any children). Defaults to <VAR>close</VAR>. + +<DT> <CODE>::tkcon::OPT(subhistory)</CODE> +<DD> Allow history substitution to occur (0 or 1, defaults to 1). The +history list is maintained in a single interpreter per TkCon console +instance. Thus you have history which can range over a series of attached +interpreters. +</DL> + + <P> + +An <b>example TkCon resource file</b> might look like: + +<PRE style="color: #883333">###################################################### +## My TkCon Resource File + +# Use a fixed default font +#tkcon font fixed; # valid on unix +#tkcon font systemfixed; # valid on win +tkcon font Courier 12; # valid everywhere + +# Keep 50 commands in history +set ::tkcon::OPT(history) 50 + +# Use a pink prompt +set ::tkcon::COLOR(prompt) pink +######################################################</PRE> + + <p> +</DIV> +</TD></TR></TABLE> + +<HR NOSHADE SIZE=1> +<ADDRESS><FONT SIZE=2>© +Jeffrey Hobbs</FONT></ADDRESS> + +</BODY> +</HTML> diff --git a/tkcon/docs/style.css b/tkcon/docs/style.css new file mode 100644 index 0000000..7aee5e8 --- /dev/null +++ b/tkcon/docs/style.css @@ -0,0 +1,50 @@ +body, div, p, th, td, li, dd, ul, ol, dl, dt, blockquote { + font-family: Arial, Helvetica, sans-serif; +} +body { + background-color: #FFFFFF; + font-size: 12px; + line-height: 1.25; + letter-spacing: .2px; +} +th { + font-style: bold; + text-align: left; +} +a { text-decoration: none } +.hi, .hi2 { + font-weight: bold; + color: #B82619; + background: #FFFFCC; + text-decoration: none; +} +.hi2 { background: #CCFFCC; } +.indent { margin: 3px; } + +/* general styles */ +.heading { + font-size: 14px; + font-weight: bold; + color: #B82619; +} +.subheading { + font-weight: bold; + color: #B82619; +} + +.err { + font-weight: bold; + color: #B82619; +} +.smallText{ + font-size: 10px; +} +.notsosmallText { + font-size: 11px; +} + +/* unordered list without bullets */ +ul.sans { + list-style-type: none; + list-style-postition: inside; +} diff --git a/tkcon/docs/tkcon.1.man b/tkcon/docs/tkcon.1.man new file mode 100644 index 0000000..25ba74b --- /dev/null +++ b/tkcon/docs/tkcon.1.man @@ -0,0 +1,369 @@ +[comment {-*- tcl -*- tkcon manpage}] +[manpage_begin tkcon 1 2.5] +[copyright {Jeffrey Hobbs (jeff at hobbs.org)}] +[moddesc {TkCon}] +[titledesc {Tk console replacement}] + +[description] +[para] +TkCon is a replacement for the standard console that comes with Tk +(on Windows/Mac, but also works on Unix). +The console itself provides many more features than the standard +console. +TkCon works on all platforms where Tcl/Tk is available. +It is meant primarily to aid one when working with the little +details inside Tcl and Tk, giving Unix users the GUI console +provided by default in the Mac and Windows Tk. + +[list_begin definitions] +[call [cmd tkcon] [lb]\{[arg option] [arg value] | [arg tcl_script]\} ...[rb]] +[list_end] + +[section OPTIONS] +[para] +Except for [cmd -rcfile], command line arguments are handled after +the TkCon resource file is sourced, but before the slave +interpreter or the TkCon user interface is initialized. + +[para] +[cmd -rcfile] is handled right before it would be sourced, +allowing you to specify any alternate file. +Command line arguments are passed to each new console and +will be evaluated by each. +To prevent this from happening, you have to say + +[example_begin] +tkcon main set argv {}; tkcon main set argc 0 +[example_end] + +[para] +For these options, any unique substring is allowed. + +[list_begin definitions] +[def "[cmd -argv] (also [cmd --])"] +Causes TkCon to stop evaluating arguments and set the remaining +args to be argv/argc (with [cmd --] prepended). +This carries over for any further consoles. +This is meant only for wrapping TkCon +around programs that require their own arguments. + +[def "[cmd -color-<color>] [arg color]"] +Sets the requested color type to the specified color for tkcon. +See [cmd tkconrc](5) for the recognized [cmd <color>] names. + +[def "[cmd -eval] [arg tcl_script] (also [cmd -main] or [cmd -e])"] +A Tcl script to eval in each main interpreter. +This is evaluated after the resource file is loaded and the +slave interpreter is created. +Multiple [cmd -eval] switches will be recognized (in order). + +[def "[cmd -exec] [arg slavename]"] +Sets the named slave that tkcon operates in. +In general, this is only useful to set to [arg {""}] (empty), +indicating to tkcon to avoid the multi-interpreter model and +operate in the main environment. +When this is empty, any further arguments will be only used +in the first tkcon console and not passed onto further new consoles. +This is useful when using tkcon as a console for extended wish +executables that don't load there commands into slave interpreters. + +[def "[cmd -font] [arg font]"] +Sets the font that tkcon uses for its text windows. +If this isn't a fixed width font, tkcon will override it. + +[def "[cmd -nontcl] [arg TCL_BOOLEAN]"] +Sets [cmd ::tkcon::OPT(nontcl)] to [arg TCL_BOOLEAN] (see +[cmd tkconrc](5)). +Needed when attaching to non-Tcl interpreters. + +[def "[cmd -package] [arg package_name] (also [cmd -load])"] +Packages to automatically load into the slave interpreters (i.e. "Tk"). + +[def "[cmd -rcfile] [arg filename]"] +Specify an alternate tkcon resource file name. + +[def "[cmd -root] [arg widgetname]"] +Makes the named widget the root name of all consoles (i.e. .tkcon). + +[def "[cmd -slave] [arg tcl_script]"] +A Tcl script to eval in each slave interpreter. +This will append the one specified in the tkcon resource file, if any. + +[list_end] + +[section {KEY BINDINGS}] +[para] +Most of the bindings are the same as for the [cmd text] widget. +Some have been modified to make sure that the integrity of the +console is maintained. +Others have been added to enhance the usefulness of the console. +Only the modified or new bindings are listed here. + +[list_begin definitions] + +[def "[cmd Control-x] or [cmd Cut] (on Sparc5 keyboards)"] +Cut. + +[def "[cmd Control-c] or [cmd Copy] (on Sparc5 keyboards)"] +Copy. + +[def "[cmd Control-v] or [cmd Paste] (on Sparc5 keyboards)"] +Paste. + +[def [cmd Insert]] +Insert (duh). + +[def [cmd Up]] +Goes up one level in the commands line history when cursor is on +the prompt line, otherwise it moves through the buffer. + +[def [cmd Down]] +Goes down one level in the commands line history when cursor +is on the last line of the buffer, otherwise it moves through the buffer. + +[def [cmd Control-p]] +Goes up one level in the commands line history. + +[def [cmd Control-n]] +Goes down one level in the commands line history. + +[def [cmd Tab]] +Tries to expand file path names, then variable names, then proc names. + +[def [cmd Escape]] +Tries to expand file path names. + +[def [cmd Control-P]] +Tries to expand procedure names. +The procedure names will be those that are actually in the attached +interpreter (unless nontcl is specified, in which case it always +does the lookup in the default slave interpreter). + +[def [cmd Control-V]] +Tries to expand variable names (those returned by [lb]info vars[rb]). +It's search behavior is like that for procedure names. + +[def "[cmd Return] or [cmd Enter]"] +Evaluates the current command line if it is a complete command, +otherwise it just goes to a new line. + +[def [cmd Control-a]] +Go to the beginning of the current command line. + +[def [cmd Control-l]] +Clear the entire console buffer. + +[def [cmd Control-r]] +Searches backwards in the history for any command that contains +the string in the current command line. +Repeatable to search farther back. +The matching substring off the found command will blink. + +[def [cmd Control-s]] +As above, but searches forward (only useful if you searched too far back). + +[def [cmd Control-t]] +Transposes characters. + +[def [cmd Control-u]] +Clears the current command line. + +[def [cmd Control-z]] +Saves current command line in a buffer that can be retrieved +with another [cmd Control-z]. +If the current command line is empty, then any saved command +is retrieved without being overwritten, otherwise the current +contents get swapped with what's in the saved command buffer. + +[def [cmd Control-Key-1]] +Attaches console to the console's slave interpreter. + +[def [cmd Control-Key-2]] +Attaches console to the console's master interpreter. + +[def [cmd Control-Key-3]] +Attaches console to main TkCon interpreter. + +[def [cmd Control-A]] +Pops up the "About" dialog. + +[def [cmd Control-N]] +Creates a new console. Each console has separate state, including +it's own widget hierarchy (it's a slave interpreter). + +[def [cmd Control-q]] +Close the current console OR Quit the program (depends on the +value of [cmd ::tkcon::TKCON(slaveexit)]). + +[def [cmd Control-w]] +Closes the current console. +Closing the main console will exit the program (something has +to control all the slaves...). + +[list_end] + +[para] +TkCon also has electric bracing (similar to that in emacs). +It will highlight matching pairs of {}'s, [lb][rb]'s, ()'s and ""'s. +For the first three, if there is no matching left element for the right, +then it blinks the entire current command line. +For the double quote, if there is no proper match then it just blinks +the current double quote character. +It does properly recognize most escaping (except escaped escapes), +but does not look for commenting (why would you interactively +put comments in?). + +[section COMMANDS] +[para] +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: + +[list_begin definitions] + +[def "[cmd alias] ?[arg sourceCmd] [arg targetCmd] ?[arg arg] [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. + +[def "[cmd clear] ?[arg percentage]?"] +Clears the text widget. +Same as the <[cmd Control-l]> binding, except this will accept a +percentage of the buffer to clear (1-100, 100 default). + +[def "[cmd dir] ?[arg -all]? ?[arg -full]? ?[arg -long]?\ + ?[arg pattern] [arg pattern] ...?"] +Cheap way to get directory listings. +Uses glob style pattern matching. + +[def "[cmd dump] [arg type] ?[arg -nocomplain]? ?[arg {-filter pattern}]?\ + ?[cmd --]? [arg pattern] ?[arg 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 [cmd dump](n) for details. + +[def "[cmd echo] ?[arg arg] [arg arg] ...?"] +Concatenates the args and spits the result to the console (stdout). + +[def "[cmd edit] ?[arg {-type type}]? ?[arg {-find str}]?\ + ?[arg {-attach interp}]? [arg arg]"] +Opens an editor with the data from arg. +The optional type argument can be one of: [arg proc], [arg var] or [arg file]. +For proc or var, the arg may be a pattern. + +[def "[cmd idebug] [arg command] ?[arg args]?"] +Interactive debugging command. +See [cmd idebug](n) for details. + +[def "[cmd lremove] ?[arg -all]? ?[arg -regexp] [arg -glob]?\ + [arg list] [arg items]"] +Removes one or more items from a list and returns the new list. +If [arg -all] is specified, it removes all instances of each item +in the list. +If [arg -regexp] or [arg -glob] is specified, it interprets each item in +the items list as a regexp or glob pattern to match against. + +[def [cmd less]] +Aliased to [cmd edit]. + +[def [cmd ls]] +Aliased to [cmd dir] [arg -full]. + +[def [cmd more]] +Aliased to [cmd edit]. + +[def "[cmd observe] [arg type] ?[arg args]?"] +This command provides passive runtime debugging output for +variables and commands. +See [cmd observe](n) for details. + +[def "[cmd puts] (same options as always)"] +Redefined to put the output into TkCon. + +[def "[cmd tkcon] [arg method] ?[arg args]?"] +Multi-purpose command. +See [cmd tkcon](n) for details. + +[def "[cmd tclindex] [arg {?-extensions patternlist? ?-index TCL_BOOLEAN?\ + ?-package TCL_BOOLEAN? ?dir1 dir2 ...?}]"] +Convenience proc to update the [file tclIndex] (controlled by [arg -index] switch) +and/or [file pkgIndex.tcl] (controlled by [arg -package] switch) file in the named +directories based on the given pattern for files. +It defaults to creating the [file tclIndex] but not the [file pkgIndex.tcl] file, +with the directory defaulting to [lb]pwd[rb]. +The extension defaults to *.tcl, with *.[lb]info sharelibextension[rb] +added when [arg -package] is true. + +[def "[cmd unalias] [arg cmd]"] +unaliases command. + +[def "[cmd what] [arg 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. + +[def "[cmd which] [arg command]"] +Like the [syscmd 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 [cmd auto_index] for it, +it tells you the file that [cmd 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. + +[list_end] + +[para] +There are several procedures that I use as helpers that some may find +helpful in there coding (i.e. expanding pathnames). Feel free to lift +them from the code (but do assign proper attribution). + +[section EXAMLPES] +[para] +Some examples of tkcon command line startup situations: + +[example_begin] +[cmd megawish] /usr/bin/tkcon [cmd -exec] "" [cmd -root] .tkcon [arg mainfile.tcl] +[example_end] + +Use tkcon as a console for your [cmd megawish] application. +You can avoid starting the line with megawish if that is the +default [cmd wish] that TkCon would use. +The [cmd -root] ensures that tkcon will not conflict with the +application root window. + +[example_begin] +[cmd tkcon] [cmd -font] "Courier 12" [cmd -load] Tk +[example_end] + +Use the courier font for TkCon and always load Tk in slave +interpreters at startup. + +[example_begin] +[cmd tkcon] [cmd -rcfile] ~/.wishrc [cmd -color-bg] white +[example_end] + +Use the ~/.wishrc file as the resource file, and a white +background for TkCon's text widgets. + +[section FILES] +TkCon will search for a resource file in [file ~/.tkconrc]. +TkCon never sources the [file ~/.wishrc] file. +The resource file is sourced by each new instance of the console. +An example resource file is provided in [cmd tkconrc](5). + +[see_also [cmd tkconrc](5)] +[see_also [cmd dump](n) [cmd tkcon](n) [cmd idebug](n)] +[see_also [cmd observe](n) [cmd text](n)] +[keywords Tk console] + +[manpage_end] + diff --git a/tkcon/docs/tkcon.html b/tkcon/docs/tkcon.html new file mode 100755 index 0000000..cb88a52 --- /dev/null +++ b/tkcon/docs/tkcon.html @@ -0,0 +1,189 @@ +<HTML> +<HEAD> +<TITLE>tkcon: tkcon procedure</TITLE> +<LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css"> +</HEAD> + +<BODY BGCOLOR=#FFFFFF> + +<TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD> +<!-- start header info --> +<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF> +<TR> +<TH><FONT SIZE=+3>tkcon: <CODE>tkcon</CODE> procedure</FONT></TH> +<TD align=right> +<A href="http://tkcon.sourceforge.net/"> +<IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88" +height="31" border="0" alt="SourceForge Logo"></A> +</TD> +</TR> +</TABLE> +<!-- end header info --> + +</TD></TR><TR><TD> +<!-- start main navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> +<TR> +<TH CLASS="hi"><A HREF="index.html" CLASS="hi">Documentation</A></TH> +<TH><A HREF="purpose.html">Purpose & Features</A></TH> +<TH><A HREF="limits.html">Limitations</A></TH> +<TH><A HREF="todo.html">To Do</A></TH> +<TH><A HREF="license.terms">License</A></TH> +</TR><TR> +<TH COLSPAN=2><A HREF="plugin.html">Online Demo</A> +(requires <A HREF="http://tcl.activestate.com/software/plugin/">Tk plugin</A>)</TH> +<TH COLSPAN=3><A HREF="nontcl.html">Using TkCon with other Tk Languages</A></TH> +</TR> +</TABLE> +<!-- end main navigation table --> +</TD></TR><TR><TD> +<!-- start secondary navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#BBBBBB width=100%> +<TR> +<TH><A HREF="start.html">Getting Started</A></TH> +<TH><A HREF="bindings.html">Special Bindings</A></TH> +<TH><A HREF="procs.html">Procedures</A></TH> +<TH><A HREF="demopic.png">Screenshot</A></TH> +</TR> +<TR> +<TH><A HREF="dump.html"><CODE>dump</CODE></A></TH> +<TH CLASS="hi2"><A HREF="tkcon.html" CLASS="hi2"><CODE>tkcon</CODE></A></TH> +<TH><A HREF="idebug.html"><CODE>idebug</CODE></A></TH> +<TH><A HREF="observe.html"><CODE>observe</CODE></A></TH> +</TR> +</TABLE> +<!-- end secondary navigation table --> +</TD></TR><TR><TD BGCOLOR=#FFFFFF> +<DIV CLASS="indent"> + <P> +This provides lots of useful control over a console: + +<DL> + +<DT> <CODE>tkcon <b>attach</b></CODE> <I>interpreter</I> +<DD> Attaches tkcon to the named interpreter. The name must be that +returned by <CODE>[tk appname]</CODE> or a valid path to a slave +interpreter. It's best to use this via the <CODE>Console->Attach +Console</CODE> menu. + +<DT> <CODE>tkcon <b>buffer</b></CODE> ?<I>size</I>? +<DD> Sets or queries the allowed size of the console text widget in lines. +The text widget will automatically delete leading lines once this number +has been exceeded (read: this is the scroll buffer size). + +<DT> <CODE>tkcon <b>bgerror</b></CODE> ?<I>msg errorInfo</I>? +<DD> Does bgerror stuff in the tkcon master interpreter. + +<DT> <CODE>tkcon <b>close</b></CODE> or <CODE>tkcon <b>destroy</b></CODE> +<DD> Destroys this tkcon widget. + +<DT> <CODE>tkcon <b>congets</b></CODE> +<DD> Behaves like the traditional Tcl <code>gets</code>, but instead of +using <code>stdin</code>, it uses the tkcon console window. By default, +tkcon replaces the standard gets with this command. This behavior can be +controlled by altering the <code>::tkcon::OPT(gets)</code> parameter at +startup. This should not be called directly - instead rely on the +overloaded <code>gets</code>, which has support for the optional varName +parameter. + +<DT> <CODE>tkcon <b>console</b></CODE> <I>args</I> +<DD> Passes the args to the tkcon text widget (the console). + +<DT> <CODE>tkcon <b>error</b></CODE> +<DD> Pops up a dialog that gives the user a full trace of the last error +received in the tkcon console. + +<DT> <CODE>tkcon <b>find</b></CODE> <I>string ?-case TCL_BOOLEAN +-regexp TCL_BOOLEAN?</I> +<DD> Highlights all instances of <I>string</I> in the console. If the string +is empty, it clears any previous highlighting. + +<DT> <CODE>tkcon <b>font</b></CODE> ?<I>fontname</I>? +<DD> Sets or returns the font used by tkcon text widgets. + +<DT> <CODE>tkcon <b>gets</b></CODE> +<DD> Behaves like the traditional Tcl <code>gets</code>, but instead of +needing <code>stdin</code>, it pops a dialog box up for the user. The +overloaded <code>gets</code> has support for the optional varName parameter. + +<DT> <CODE>tkcon <b>getcommand</b></CODE> +<DD> A variation of the <CODE><b>congets</b></CODE> method that requires a +full command to be input before returning. + +<DT> <CODE>tkcon <b>hide</b></CODE> +<DD> Withdraw the tkcon display from the screen (make sure you have +a way to get it back). + +<DT> <CODE>tkcon <b>history</b></CODE> ?<i>-newline</i>? +<DD> Displays the tkcon history in sourceable form. If <i>-newline</i> is +specified, it separates each command by an extra newline. + +<DT> <CODE>tkcon <b>iconify</b></CODE> +<DD> Iconifies the tkcon display. + +<DT> <CODE>tkcon <b>linelength</b></CODE> ?<i>value</i>? +<DD> Sets or displays the number that specifies the limit of long result lines. +True result is still captured in $_ (and 'puts $_' works). + +<DT> <CODE>tkcon <b>load</b></CODE> <I>filename</I> +<DD> Sources named file into the slave interpreter. If no filename is +given, it will attempt to call <CODE>tk_getOpenFile</CODE> to pop up the +file select box. + +<DT> <CODE>tkcon <b>main</b></CODE> ?<I>arg arg ...</I>? +<DD> Passes the args to the main tkcon interpreter to be evaluated and +returns the result. + +<DT> <CODE>tkcon <b>master</b></CODE> <I>args</I> +<DD> Passes the args to the master interpreter to be evaluated and +returns the result. + +<DT> <CODE>tkcon <b>new</b></CODE> +<DD> Creates a new tkcon widget. + +<DT> <CODE>tkcon <b>resultfilter</b></CODE> ?<I>command</I>? +<DD> Specify a command to process the results before outputting it to the +console window. The command receives one argument (the result string) and +the string returned is placed in the console. + +<DT> <CODE>tkcon <b>save</b></CODE> ?<I>filename</I> ?<I>type</I>?? +<DD> Saves the console buffer to the given filename. If no filename is +given, it will attempt to call <CODE>tk_getSaveFile</CODE> to pop up the +file select box. If no type is given, a dialog will ask you to specify +what portion of the text you want to save. + +<DT> <CODE>tkcon <b>set</b></CODE> <I>var ?value?</I> +<DD> Queries or sets a master interpreter variable. + +<DT> <CODE>tkcon <b>append</b></CODE> <I>var ?value?</I> +<DD> Like set, but uses <CODE>append</CODE> on the variable. + +<DT> <CODE>tkcon <b>lappend</b></CODE> <I>var ?value?</I> +<DD> Like set, but uses <CODE>lappend</CODE> on the variable. + +<DT> <CODE>tkcon <b>show</b></CODE> or <CODE>tkcon deiconify</CODE> +<DD> Redisplays tkcon on the screen. + +<DT> <CODE>tkcon <b>slave</b></CODE> ?<I>slavename ?arg arg ...?</I>? +<DD> If called with no args, it returns the name of all the tkcon +interpreters. Otherwise given an interp name it passes the args +to the named interpreter to be evaluated and returns the result. +If no args are passed, then it returns the <CODE>[tk appname]</CODE> +of that interpreter. + +<DT> <CODE>tkcon <b>title</b></CODE> ?<I>title</I>? +<DD> Sets or returns the title for tkcon. + +<DT> <CODE>tkcon <b>version</b></CODE> +<DD> Returns of version of tkcon. + +</DL> +</DIV> +</TD></TR></TABLE> + +<HR NOSHADE SIZE=1> +<ADDRESS><FONT SIZE=2>© +Jeffrey Hobbs</FONT></ADDRESS> + +</BODY> +</HTML> diff --git a/tkcon/docs/tkcon.n.man b/tkcon/docs/tkcon.n.man new file mode 100644 index 0000000..6f99fa5 --- /dev/null +++ b/tkcon/docs/tkcon.n.man @@ -0,0 +1,140 @@ +[comment {-*- tcl -*- tkcon manpage}] +[manpage_begin tkcon n 2.5] +[copyright {Jeffrey Hobbs <jeff at hobbs.org>}] +[moddesc {TkCon}] +[titledesc {Controlling TkCon console}] + +[description] +[para] +This provides lots of useful control over a console: + +[list_begin definitions] + +[call [cmd tkcon] [arg attach] [arg interpreter]] +Attaches tkcon to the named interpreter. +The name must be that returned by [lb][cmd tk] [arg appname][rb] or a valid +path to a slave interpreter. +It's best to use this via the [arg {Console->Attach Console}] menu. + +[call [cmd tkcon] [arg buffer] [opt [arg size]]] +Sets or queries the allowed size of the console text widget in lines. +The text widget will automatically delete leading lines once this +number has been exceeded (read: this is the scroll buffer size). + +[call [cmd tkcon] [arg bgerror] [opt "[arg msg] [arg errorInfo]"]] +Does bgerror stuff in the tkcon master interpreter. + +[call [cmd tkcon] [arg close] or [cmd tkcon] [arg destroy]] +Destroys this tkcon widget. + +[call [cmd tkcon] [arg congets]] +Behaves like the traditional Tcl gets, but instead of using stdin, +it uses the tkcon console window. +By default, tkcon replaces the standard gets with this command. +This behavior can be controlled by altering the [cmd ::tkcon::OPT(gets)] +parameter at startup. +This should not be called directly - instead rely on the overloaded +gets, which has support for the optional varName parameter. + +[call [cmd tkcon] [arg console] [arg args]] +Passes the args to the tkcon text widget (the console). + +[call [cmd tkcon] [arg error]] +Pops up a dialog that gives the user a full trace of the +last error received in the tkcon console. + +[call [cmd tkcon] [arg find] [arg string]\ + [opt "[arg -case] [arg TCL_BOOLEAN] [arg -regexp] [arg TCL_BOOLEAN]"]] +Highlights all instances of string in the console. +If the string is empty, it clears any previous highlighting. + +[call [cmd tkcon] [arg font] [opt [arg fontname]]] +Sets or returns the font used by tkcon text widgets. + +[call [cmd tkcon] [arg gets]] +Behaves like the traditional Tcl gets, but instead of needing +stdin, it pops a dialog box up for the user. +The overloaded gets has support for the optional varName parameter. + +[call [cmd tkcon] [arg getcommand]] +A variation of the congets method that requires a full +command to be input before returning. + +[call [cmd tkcon] [arg hide]] +Withdraw the tkcon display from the screen (make sure you +have a way to get it back). + +[call [cmd tkcon] [arg history] [opt [arg -newline]]] +Displays the tkcon history in sourceable form. +If [arg -newline] is specified, it separates each command by +an extra newline. + +[call [cmd tkcon] [arg iconify]] +Iconifies the tkcon display. + +[call [cmd tkcon] [arg linelength] [opt [arg value]]] +Sets or displays the number that specifies the limit of long result lines. +True result is still captured in $_ (and 'puts $_' works). + +[call [cmd tkcon] [arg load] [arg filename]] +Sources named file into the slave interpreter. +If no filename is given, it will attempt to call +[cmd tk_getOpenFile] to pop up the file select box. + +[call [cmd tkcon] [arg main] [opt "[arg arg] [arg arg] [arg ...]"]] +Passes the args to the main tkcon interpreter to be +evaluated and returns the result. + +[call [cmd tkcon] [arg master] [arg args]] +Passes the args to the master interpreter to be evaluated +and returns the result. + +[call [cmd tkcon] [arg new]] +Creates a new tkcon widget. + +[call [cmd tkcon] [arg resultfilter] [opt [arg command]]] +Specify a command to process the results before outputting it to the console +window. The command receives one argument (the result string) and the string +returned is placed in the console. + +[call [cmd tkcon] [arg save] [opt "[arg filename] [opt [arg type]]"]] +Saves the console buffer to the given filename. +If no filename is given, it will attempt to call +[cmd tk_getSaveFile] to pop up the file select box. +If no type is given, a dialog will ask you to specify +what portion of the text you want to save. + +[call [cmd tkcon] [arg set] [arg var] [opt [arg value]]] +Queries or sets a master interpreter variable. + +[call [cmd tkcon] [arg append] [arg var] [opt [arg value]]] +Like set, but uses append on the variable. + +[call [cmd tkcon] [arg lappend] [arg var] [opt [arg value]]] +Like set, but uses lappend on the variable. + +[call [cmd tkcon] [arg show] or [cmd tkcon] [arg deiconify]] +Redisplays tkcon on the screen. + +[call [cmd tkcon] [arg slave] [opt "[arg slavename] [opt [arg {arg arg ...}]]"]] +If called with no args, it returns the name of all the tkcon interpreters. +Otherwise given an interp name it passes the args to the named interpreter +to be evaluated and returns the result. +If no args are passed, then it returns the [lb][cmd tk] [arg appname][rb] of that +interpreter. + +[call [cmd tkcon] [arg title] [opt [arg title]]] +Sets or returns the title for tkcon. + +[call [cmd tkcon] [arg version]] +Returns of version of tkcon. + +[list_end] + +[see_also [cmd tkcon](1)] +[see_also [cmd tkconrc](5) [cmd tkcon](n) [cmd dump](n)] +[see_also [cmd observe](n)] +[keywords Tk console debug] + +[manpage_end] + diff --git a/tkcon/docs/tkconrc.5.man b/tkcon/docs/tkconrc.5.man new file mode 100644 index 0000000..b10af92 --- /dev/null +++ b/tkcon/docs/tkconrc.5.man @@ -0,0 +1,249 @@ +[comment {-*- tcl -*- tkconrc manpage}] +[manpage_begin tkconrc 5 2.5] +[copyright {Jeffrey Hobbs <jeff at hobbs.org>}] +[moddesc {TkCon}] +[titledesc {TkCon resource file}] + +[description] +[para] +TkCon will search for a resource file in [file ~/.tkconrc]. +TkCon never sources the [file ~/.wishrc] file. +The resource file is sourced by each new instance of the console. +An example resource file is provided below. + +[para] +The file itself is a Tcl script, so it is required that the +file conforms to Tcl script conventions. + +[section VARIABLES] +[para] +Certain variables in TkCon can be modified to suit your needs. +It's easiest to do this in the resource file, but you can do +it when time the program is running (and some can be changed +via the [arg Prefs] menu). +All these are part of the master interpreter's [cmd ::tkcon] +namespace. +The modifiable array variables are [cmd ::tkcon::COLOR] and +[cmd ::tkcon::OPT]. +You can call + +[example_begin] +tkcon set ::tkcon::COLOR +[example_end] + +when the program is running to check its state. +Here is an explanation of certain variables you +might change or use: + +[list_begin definitions] + +[def [cmd ::tkcon::COLOR(bg)]] +The background color for tkcon text widgets. +Defaults to the operating system default (determined at startup). + +[def [cmd ::tkcon::COLOR(blink)]] +The background color of the electric brace highlighting, if on. +Defaults to yellow. + +[def [cmd ::tkcon::COLOR(cursor)]] +The background color for the insertion cursor in tkcon. +Defaults to black. + +[def [cmd ::tkcon::COLOR(disabled)]] +The foreground color for disabled menu items. +Defaults to dark grey. + +[def [cmd ::tkcon::COLOR(proc)]] +The foreground color of a recognized proc, if command highlighting is on. +Defaults to dark green. + +[def [cmd ::tkcon::COLOR(var)]] +The background color of a recognized var, if command highlighting is on. +Defaults to pink. + +[def [cmd ::tkcon::COLOR(prompt)]] +The foreground color of the prompt as output in the console. +Defaults to brown. + +[def [cmd ::tkcon::COLOR(stdin)]] +The foreground color of the stdin for the console. +Defaults to black. + +[def [cmd ::tkcon::COLOR(stdout)]] +The foreground color of the stdout as output in the console. +Defaults to blue. + +[def [cmd ::tkcon::COLOR(stderr)]] +The foreground color of stderr as output in the console. +Defaults to red. + +[def [cmd ::tkcon::OPT(autoload)]] +Packages to automatically load into the slave interpreter (i.e. 'Tk'). +This is a list. +Defaults to {} (none). + +[def [cmd ::tkcon::OPT(blinktime)]] +The amount of time (in millisecs) that braced sections should blink for. +Defaults to 500 (0.5 secs), must be at least 100. + +[def [cmd ::tkcon::OPT(blinkrange)]] +Whether to blink the entire range for electric brace matching +or to just blink the actual matching braces (respectively 1 or 0, +defaults to 1). + +[def [cmd ::tkcon::OPT(buffer)]] +The size of the console scroll buffer (in lines). +Defaults to 512. + +[def [cmd ::tkcon::OPT(calcmode)]] +Whether to allow expr commands to be run at the command line +without prefixing them with expr (just a convenience). + +[def [cmd ::tkcon::OPT(cols)]] +Number of columns for the console to start out with. +Defaults to 80. + +[def [cmd ::tkcon::OPT(dead)]] +What to do with dead connected interpreters. +If dead is leave, TkCon automatically exits the dead interpreter. +If dead is ignore then it remains attached waiting for the +interpreter to reappear. +Otherwise TkCon will prompt you. + +[def [cmd ::tkcon::OPT(exec)]] +This corresponds to the [cmd -exec] tkcon option (see [cmd tkcon](1)). + +[def [cmd ::tkcon::OPT(font)]] +Font to use for tkcon text widgets (also specified with [cmd -font] option). +Defaults to the system default, or a fixed width equivalent. + +[def [cmd ::tkcon::OPT(gets)]] +Controls whether tkcon will overload the gets command to work with tkcon. +The valid values are: congets (the default), which will redirect +stdin requests to the tkcon window; gets, which will pop up a dialog to +get input; and {} (empty string) which tells tkcon not to overload gets. +This value must be set at startup to alter tkcon's behavior. + +[def [cmd ::tkcon::OPT(history)]] +The size of the history list to keep. +Defaults to 48. + +[def [cmd ::tkcon::OPT(hoterrors)]] +Whether hot errors are enabled or not. +When enabled, errors that are returned to the console are marked +with a link to the error info that will pop up in an minimal editor. +This requires more memory because each error that occurs will +maintain bindings for this feature, as long as the error +is in the text widget. +Defaults to on. + +[def [cmd ::tkcon::OPT(library)]] +The path to any tcl library directories (these are appended +to the [cmd auto_path] when the after the resource file is loaded in). + +[def [cmd ::tkcon::OPT(lightbrace)]] +Whether to use the brace highlighting feature or not +(respectively 1 or 0, defaults to 1). + +[def [cmd ::tkcon::OPT(lightcmd)]] +Whether to use the command highlighting feature or not +(respectively 1 or 0, defaults to 1). + +[def [cmd ::tkcon::OPT(maineval)]] +A tcl script to execute in the main interpreter after the +slave interpreter is created and the user interface is initialized. + +[def [cmd ::tkcon::OPT(maxlinelen)]] +A number that specifies the limit of long result lines. +True result is still captured in $_ (and 'puts $_' works). +Defaults to 0 (unlimited). + +[def [cmd ::tkcon::OPT(maxmenu)]] +A number that specifies the maximum number of packages to +show vertically in the [arg Interp->Packages] menu before breaking +into another column. +Defaults to 15. + +[def [cmd ::tkcon::OPT(nontcl)]] +For those who might be using non-Tcl based Tk attachments, set this to 1. +It prevents TkCon from trying to evaluate its own Tcl +code in an attached interpreter. +Also see my notes for non-Tcl based Tk interpreters. + +[def [cmd ::tkcon::OPT(prompt1)]] +Like [cmd tcl_prompt1], except it doesn't require you use [cmd puts]. +No equivalent for [cmd tcl_prompt2] is available (it's unnecessary IMHO). +Defaults to {([lb]file tail [lb]pwd[rb][rb]) [lb]history nextid[rb] % }. + +[def [cmd ::tkcon::OPT(rows)]] +Number of rows for the console to start out with. +Defaults to 20. + +[def [cmd ::tkcon::OPT(scollypos)]] +Y scrollbar position. +Valid values are left or right. +Defaults to right. + +[def [cmd ::tkcon::OPT(showmenu)]] +Show the menubar on startup (1 or 0, defaults to 1). + +[def [cmd ::tkcon::OPT(showmultiple)]] +Show multiple matches for path/proc/var name expansion (1 or 0, +defaults to 1). + +[def [cmd ::tkcon::OPT(slaveeval)]] +A tcl script to execute in each slave interpreter right after it's created. +This allows the user to have user defined info always available in a slave. + +[para] +Example: + +[example_begin] +set ::tkcon::OPT(slaveeval) { + proc foo args { puts $args } + lappend auto_path . +} +[example_end] + +[def [cmd ::tkcon::OPT(slaveexit)]] +Allows the prevention of exit in slaves from exitting the entire application. +If it is equal to exit, exit will exit as usual, otherwise it will just close +down that interpreter (and any children). +Defaults to close. + +[def [cmd ::tkcon::OPT(subhistory)]] +Allow history substitution to occur (0 or 1, defaults to 1). +The history list is maintained in a single interpreter per TkCon console +instance. +Thus you have history which can range over a series of attached interpreters. + +[list_end] + +[section EXAMPLES] +[para] +An example TkCon resource file might look like: + +[example_begin] +###################################################### +## My TkCon Resource File + +# Use a fixed default font +#tkcon font fixed; # valid on unix +#tkcon font systemfixed; # valid on win +tkcon font Courier 12; # valid everywhere + +# Keep 50 commands in history +set ::tkcon::OPT(history) 50 + +# Use a pink prompt +set ::tkcon::COLOR(prompt) pink +###################################################### +[example_end] + +[see_also [cmd tkcon](1)] +[see_also [cmd dump](n) [cmd tkcon](n) [cmd idebug](n)] +[see_also [cmd observe](n)] +[keywords Tk console] + +[manpage_end] + diff --git a/tkcon/docs/todo.html b/tkcon/docs/todo.html new file mode 100755 index 0000000..f9c2b3a --- /dev/null +++ b/tkcon/docs/todo.html @@ -0,0 +1,99 @@ +<HTML> +<HEAD> +<TITLE>tkcon: To Do Ideas</TITLE> +<LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css"> +</HEAD> + +<BODY BGCOLOR=#FFFFFF> + +<TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD> +<!-- start header info --> +<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF> +<TR> +<TH><FONT SIZE=+3>tkcon: To Do Ideas</FONT></TH> +<TD align=right> +<A href="http://tkcon.sourceforge.net/"> +<IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88" +height="31" border="0" alt="SourceForge Logo"></A> +</TD> +</TR> +</TABLE> +<!-- end header info --> + +</TD></TR><TR><TD> +<!-- start main navigation table --> +<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> +<TR> +<TH><A HREF="index.html">Documentation</A></TH> +<TH><A HREF="purpose.html">Purpose & Features</A></TH> +<TH><A HREF="limits.html">Limitations</A></TH> +<TH CLASS="hi"><A HREF="todo.html" CLASS="hi">To Do</A></TH> +<TH><A HREF="license.terms">License</A></TH> +</TR><TR> +<TH COLSPAN=2><A HREF="plugin.html">Online Demo</A> +(requires <A HREF="http://tcl.activestate.com/software/plugin/">Tk plugin</A>)</TH> +<TH COLSPAN=3><A HREF="nontcl.html">Using TkCon with other Tk Languages</A></TH> +</TR> +</TABLE> +<!-- end main navigation table --> + +</TD></TR><TR><TD BGCOLOR=#FFFFFF> +<DIV CLASS="indent"> +<H3>Future Ideas</H3> + +<UL> +<LI> Add encoding auto-conversion to exec commands +<LI> keep history file, also keep history of sourced files +<LI> <PRE>set mimetype(extension,au) "audio/u-law" +set mimetype(extension,wav) "audio/wave" +set mimetype(extension,mid) "audio/midi" +/etc/magic +proc run {file} { + global mimetype + + if {[file executable $file]} { + exec $file + return + } + + catch {set mimetype $mimetype(extension,[file extension $file])} + + if {![info exists mimetype]} { + set mimetype $mimetype(magic,[exec /bin/file $file]) + } + + exec $mimetype(application,$mimetype) $file +}</PRE> + +<LI> Add socket level communication model +<LI> Enhance the true debugging capabilities - I'm looking at +tcl-debug and into what I can adopt from the tkInspect philosophy. +<LI> I'm taking ideas... +</UL> + +<H3>Known Bugs/Quirks</H3> + +<UL> +<LI> Command highlighting isn't perfect because I try to make it too +efficient. +<LI> All interpreters have the same current working directory. This is +a limitation of tcl. +<LI> You can't 'attach' on machines where <CODE>send</CODE> does not exist. +<A HREF="http://www.osf.org/~loverso/">John Loverso</A> has a comm.tcl +replacement. +In any case, you can still attach to internal interpreters and namespaces. +<LI> Need to clean up checkpointed states when the associated interp dies. +Works with slaves, but not foreign interps. +<LI> Can't identify non-Tcl or pre-Tk4 interpreters automagically... +<LI> You tell me... +</UL> + +</DIV> +</TD></TR></TABLE> + +<HR NOSHADE SIZE=1> +<ADDRESS><FONT SIZE=2>© +Jeffrey Hobbs</FONT></ADDRESS> + +</BODY> +</HTML> |