TkCon: tkcon
procedure
This provides lots of useful control over a console:
-
tkcon attach
interpreter
- Attaches TkCon to the named interpreter. The name must be that
returned by
[tk appname]
or a valid path to a slave
interpreter. It's best to use this via the Console->Attach
Console
menu.
-
tkcon buffer
?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).
-
tkcon bgerror
?msg errorInfo?
- Does bgerror stuff in the TkCon master interpreter.
-
tkcon close
or tkcon destroy
- Destroys this TkCon widget.
-
tkcon console
args
- Passes the args to the TkCon text widget (the console).
-
tkcon error
- Pops up a dialog that gives the user a full trace of the last error
received in the TkCon console.
-
tkcon find
string ?-case TCL_BOOLEAN
-regexp TCL_BOOLEAN?
- Highlights all instances of string in the console. If the string
is empty, it clears any previous highlighting.
-
tkcon font
?fontname?
- Sets or returns the font used by tkcon text widgets.
-
tkcon gets
?varname?
- Behaves like the traditional Tcl
gets
, but uses the
TkCon console instead of stdin
.
-
tkcon hide
- Withdraw the TkCon display from the screen (make sure you have
a way to get it back).
-
tkcon history
?-newline?
- Displays the TkCon history in sourceable form. If -newline is
specified, it separates each command by an extra newline.
-
tkcon iconify
- Iconifies the TkCon display.
-
tkcon load
filename
- Sources named file into the slave interpreter. If no filename is
given, it will attempt to call
tk_getOpenFile
to pop up the
file select box.
-
tkcon main
?arg arg ...?
- Passes the args to the main TkCon interpreter to be evaluated and
returns the result.
-
tkcon master
args
- Passes the args to the master interpreter to be evaluated and
returns the result.
-
tkcon new
- Creates a new TkCon widget.
-
tkcon save
?filename ?type??
- Saves the console buffer to the given filename. If no filename is
given, it will attempt to call
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.
-
tkcon set
var ?value?
- Queries or sets a master interpreter variable.
-
tkcon append
var ?value?
- Like set, but uses
append
on the variable.
-
tkcon lappend
var ?value?
- Like set, but uses
lappend
on the variable.
-
tkcon show
or tkcon deiconify
- Redisplays TkCon on the screen.
-
tkcon slave
?slavename ?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
[tk appname]
of that interpreter.
-
tkcon title
?title?
- Sets or returns the title for TkCon.
-
tkcon version
- Returns of version of TkCon.
©
Jeffrey Hobbs