1 | <HTML> |
---|
2 | <HEAD> |
---|
3 | <TITLE>tkcon: tkcon procedure</TITLE> |
---|
4 | <LINK REL="STYLESHEET" TYPE="text/css" HREF="./style.css"> |
---|
5 | </HEAD> |
---|
6 | |
---|
7 | <BODY BGCOLOR=#FFFFFF> |
---|
8 | |
---|
9 | <TABLE WIDTH=100% BORDER=0 CELLSPACING=2 CELLPADDING=0 BGCOLOR=#000000><TR><TD> |
---|
10 | <!-- start header info --> |
---|
11 | <TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=#FFFFFF> |
---|
12 | <TR> |
---|
13 | <TH><FONT SIZE=+3>tkcon: <CODE>tkcon</CODE> procedure</FONT></TH> |
---|
14 | <TD align=right> |
---|
15 | <A href="http://tkcon.sourceforge.net/"> |
---|
16 | <IMG src="http://sourceforge.net/sflogo.php?group_id=11462&type=1" width="88" |
---|
17 | height="31" border="0" alt="SourceForge Logo"></A> |
---|
18 | </TD> |
---|
19 | </TR> |
---|
20 | </TABLE> |
---|
21 | <!-- end header info --> |
---|
22 | |
---|
23 | </TD></TR><TR><TD> |
---|
24 | <!-- start main navigation table --> |
---|
25 | <TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#CCCCCC width=100%> |
---|
26 | <TR> |
---|
27 | <TH CLASS="hi"><A HREF="index.html" CLASS="hi">Documentation</A></TH> |
---|
28 | <TH><A HREF="purpose.html">Purpose & Features</A></TH> |
---|
29 | <TH><A HREF="limits.html">Limitations</A></TH> |
---|
30 | <TH><A HREF="todo.html">To Do</A></TH> |
---|
31 | <TH><A HREF="license.terms">License</A></TH> |
---|
32 | </TR><TR> |
---|
33 | <TH COLSPAN=2><A HREF="plugin.html">Online Demo</A> |
---|
34 | (requires <A HREF="http://tcl.activestate.com/software/plugin/">Tk plugin</A>)</TH> |
---|
35 | <TH COLSPAN=3><A HREF="nontcl.html">Using TkCon with other Tk Languages</A></TH> |
---|
36 | </TR> |
---|
37 | </TABLE> |
---|
38 | <!-- end main navigation table --> |
---|
39 | </TD></TR><TR><TD> |
---|
40 | <!-- start secondary navigation table --> |
---|
41 | <TABLE BORDER=1 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#BBBBBB width=100%> |
---|
42 | <TR> |
---|
43 | <TH><A HREF="start.html">Getting Started</A></TH> |
---|
44 | <TH><A HREF="bindings.html">Special Bindings</A></TH> |
---|
45 | <TH><A HREF="procs.html">Procedures</A></TH> |
---|
46 | <TH><A HREF="demopic.gif">Screenshot</A></TH> |
---|
47 | </TR> |
---|
48 | <TR> |
---|
49 | <TH><A HREF="dump.html"><CODE>dump</CODE></A></TH> |
---|
50 | <TH CLASS="hi2"><A HREF="tkcon.html" CLASS="hi2"><CODE>tkcon</CODE></A></TH> |
---|
51 | <TH><A HREF="idebug.html"><CODE>idebug</CODE></A></TH> |
---|
52 | <TH><A HREF="observe.html"><CODE>observe</CODE></A></TH> |
---|
53 | </TR> |
---|
54 | </TABLE> |
---|
55 | <!-- end secondary navigation table --> |
---|
56 | </TD></TR><TR><TD BGCOLOR=#FFFFFF> |
---|
57 | <DIV CLASS="indent"> |
---|
58 | <P> |
---|
59 | This provides lots of useful control over a console: |
---|
60 | |
---|
61 | <DL> |
---|
62 | |
---|
63 | <DT> <CODE>tkcon <b>attach</b></CODE> <I>interpreter</I> |
---|
64 | <DD> Attaches tkcon to the named interpreter. The name must be that |
---|
65 | returned by <CODE>[tk appname]</CODE> or a valid path to a slave |
---|
66 | interpreter. It's best to use this via the <CODE>Console->Attach |
---|
67 | Console</CODE> menu. |
---|
68 | |
---|
69 | <DT> <CODE>tkcon <b>buffer</b></CODE> ?<I>size</I>? |
---|
70 | <DD> Sets or queries the allowed size of the console text widget in lines. |
---|
71 | The text widget will automatically delete leading lines once this number |
---|
72 | has been exceeded (read: this is the scroll buffer size). |
---|
73 | |
---|
74 | <DT> <CODE>tkcon <b>bgerror</b></CODE> ?<I>msg errorInfo</I>? |
---|
75 | <DD> Does bgerror stuff in the tkcon master interpreter. |
---|
76 | |
---|
77 | <DT> <CODE>tkcon <b>close</b></CODE> or <CODE>tkcon <b>destroy</b></CODE> |
---|
78 | <DD> Destroys this tkcon widget. |
---|
79 | |
---|
80 | <DT> <CODE>tkcon <b>congets</b></CODE> |
---|
81 | <DD> Behaves like the traditional Tcl <code>gets</code>, but instead of |
---|
82 | using <code>stdin</code>, it uses the tkcon console window. By default, |
---|
83 | tkcon replaces the standard gets with this command. This behavior can be |
---|
84 | controlled by altering the <code>::tkcon::OPT(gets)</code> parameter at |
---|
85 | startup. This should not be called directly - instead rely on the |
---|
86 | overloaded <code>gets</code>, which has support for the optional varName |
---|
87 | parameter. |
---|
88 | |
---|
89 | <DT> <CODE>tkcon <b>console</b></CODE> <I>args</I> |
---|
90 | <DD> Passes the args to the tkcon text widget (the console). |
---|
91 | |
---|
92 | <DT> <CODE>tkcon <b>error</b></CODE> |
---|
93 | <DD> Pops up a dialog that gives the user a full trace of the last error |
---|
94 | received in the tkcon console. |
---|
95 | |
---|
96 | <DT> <CODE>tkcon <b>find</b></CODE> <I>string ?-case TCL_BOOLEAN |
---|
97 | -regexp TCL_BOOLEAN?</I> |
---|
98 | <DD> Highlights all instances of <I>string</I> in the console. If the string |
---|
99 | is empty, it clears any previous highlighting. |
---|
100 | |
---|
101 | <DT> <CODE>tkcon <b>font</b></CODE> ?<I>fontname</I>? |
---|
102 | <DD> Sets or returns the font used by tkcon text widgets. |
---|
103 | |
---|
104 | <DT> <CODE>tkcon <b>gets</b></CODE> |
---|
105 | <DD> Behaves like the traditional Tcl <code>gets</code>, but instead of |
---|
106 | needing <code>stdin</code>, it pops a dialog box up for the user. The |
---|
107 | overloaded <code>gets</code> has support for the optional varName parameter. |
---|
108 | |
---|
109 | <DT> <CODE>tkcon <b>getcommand</b></CODE> |
---|
110 | <DD> A variation of the <CODE><b>congets</b></CODE> method that requires a |
---|
111 | full command to be input before returning. |
---|
112 | |
---|
113 | <DT> <CODE>tkcon <b>hide</b></CODE> |
---|
114 | <DD> Withdraw the tkcon display from the screen (make sure you have |
---|
115 | a way to get it back). |
---|
116 | |
---|
117 | <DT> <CODE>tkcon <b>history</b></CODE> ?<i>-newline</i>? |
---|
118 | <DD> Displays the tkcon history in sourceable form. If <i>-newline</i> is |
---|
119 | specified, it separates each command by an extra newline. |
---|
120 | |
---|
121 | <DT> <CODE>tkcon <b>iconify</b></CODE> |
---|
122 | <DD> Iconifies the tkcon display. |
---|
123 | |
---|
124 | <DT> <CODE>tkcon <b>load</b></CODE> <I>filename</I> |
---|
125 | <DD> Sources named file into the slave interpreter. If no filename is |
---|
126 | given, it will attempt to call <CODE>tk_getOpenFile</CODE> to pop up the |
---|
127 | file select box. |
---|
128 | |
---|
129 | <DT> <CODE>tkcon <b>main</b></CODE> ?<I>arg arg ...</I>? |
---|
130 | <DD> Passes the args to the main tkcon interpreter to be evaluated and |
---|
131 | returns the result. |
---|
132 | |
---|
133 | <DT> <CODE>tkcon <b>master</b></CODE> <I>args</I> |
---|
134 | <DD> Passes the args to the master interpreter to be evaluated and |
---|
135 | returns the result. |
---|
136 | |
---|
137 | <DT> <CODE>tkcon <b>new</b></CODE> |
---|
138 | <DD> Creates a new tkcon widget. |
---|
139 | |
---|
140 | <DT> <CODE>tkcon <b>save</b></CODE> ?<I>filename</I> ?<I>type</I>?? |
---|
141 | <DD> Saves the console buffer to the given filename. If no filename is |
---|
142 | given, it will attempt to call <CODE>tk_getSaveFile</CODE> to pop up the |
---|
143 | file select box. If no type is given, a dialog will ask you to specify |
---|
144 | what portion of the text you want to save. |
---|
145 | |
---|
146 | <DT> <CODE>tkcon <b>set</b></CODE> <I>var ?value?</I> |
---|
147 | <DD> Queries or sets a master interpreter variable. |
---|
148 | |
---|
149 | <DT> <CODE>tkcon <b>append</b></CODE> <I>var ?value?</I> |
---|
150 | <DD> Like set, but uses <CODE>append</CODE> on the variable. |
---|
151 | |
---|
152 | <DT> <CODE>tkcon <b>lappend</b></CODE> <I>var ?value?</I> |
---|
153 | <DD> Like set, but uses <CODE>lappend</CODE> on the variable. |
---|
154 | |
---|
155 | <DT> <CODE>tkcon <b>show</b></CODE> or <CODE>tkcon deiconify</CODE> |
---|
156 | <DD> Redisplays tkcon on the screen. |
---|
157 | |
---|
158 | <DT> <CODE>tkcon <b>slave</b></CODE> ?<I>slavename ?arg arg ...?</I>? |
---|
159 | <DD> If called with no args, it returns the name of all the tkcon |
---|
160 | interpreters. Otherwise given an interp name it passes the args |
---|
161 | to the named interpreter to be evaluated and returns the result. |
---|
162 | If no args are passed, then it returns the <CODE>[tk appname]</CODE> |
---|
163 | of that interpreter. |
---|
164 | |
---|
165 | <DT> <CODE>tkcon <b>title</b></CODE> ?<I>title</I>? |
---|
166 | <DD> Sets or returns the title for tkcon. |
---|
167 | |
---|
168 | <DT> <CODE>tkcon <b>version</b></CODE> |
---|
169 | <DD> Returns of version of tkcon. |
---|
170 | |
---|
171 | </DL> |
---|
172 | </DIV> |
---|
173 | </TD></TR></TABLE> |
---|
174 | |
---|
175 | <HR NOSHADE SIZE=1> |
---|
176 | <ADDRESS><FONT SIZE=2>© |
---|
177 | <A HREF="mailto:jeff.hobbs@acm.org">Jeffrey Hobbs</A></FONT></ADDRESS> |
---|
178 | |
---|
179 | </BODY> |
---|
180 | </HTML> |
---|