1 |
578 |
markom |
|
2 |
|
|
<center><h1>Tix Frequently Asked Questions</h1></center>
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
<h3>Table of Contents</h3>
|
6 |
|
|
|
7 |
|
|
<DL>
|
8 |
|
|
<DT><i><b>
|
9 |
|
|
Legal Issues
|
10 |
|
|
</b></i><DD><ul>
|
11 |
|
|
<li> <a href=#legal.1> [L.1] </a>
|
12 |
|
|
Is Tix free software?
|
13 |
|
|
</ul><p>
|
14 |
|
|
<DT><i><b>
|
15 |
|
|
General Questions About Using The Tix Library
|
16 |
|
|
</b></i><DD><ul>
|
17 |
|
|
<li> <a href=#general.1> [G.1] </a>
|
18 |
|
|
What does the "<code>-disablecallback</code>"
|
19 |
|
|
option do?
|
20 |
|
|
<li> <a href=#general.2> [G.2] </a>
|
21 |
|
|
How do I set the width of the entry subwidget inside the tixControl widget?
|
22 |
|
|
<li> <a href=#general.3> [G.3] </a>
|
23 |
|
|
What is the "<code>setslient</code>" method?
|
24 |
|
|
<li> <a href=#general.4> [G.4] </a>
|
25 |
|
|
Is there a Tix interface builder in the works?
|
26 |
|
|
<li> <a href=#general.5> [G.5] </a>
|
27 |
|
|
Can you tell me about the syntax of tixForm
|
28 |
|
|
<li> <a href=#general.6> [G.6] </a>
|
29 |
|
|
|
30 |
|
|
I am not using the tixForm geometry manager, but it is giving me
|
31 |
|
|
errors about TixForm. What happened?
|
32 |
|
|
<li> <a href=#general.7> [G.7] </a>
|
33 |
|
|
How do I generate the <code>tclIndex</code> file for Tix?
|
34 |
|
|
<li> <a href=#general.8> [G.8] </a>
|
35 |
|
|
Can I ignore the default arguments passed by the various
|
36 |
|
|
<code>-command</code> and <code>-broeswcmd</code> options?
|
37 |
|
|
<li> <a href=#general.9> [G.9] </a>
|
38 |
|
|
What does <code>tixWidgetDoWhenIdle</code> do?
|
39 |
|
|
<li> <a href=#general.feature_req> [G.10] </a>
|
40 |
|
|
Why isn't such a feature in Tix? Will it be implemented?
|
41 |
|
|
<li> <a href=#general.softwares> [G.11] </a>
|
42 |
|
|
Who are using Tix in their software?
|
43 |
|
|
<li> <a href=#general.twice> [G.12] </a>
|
44 |
|
|
|
45 |
|
|
I am using a DirList widget. When the user clicks on an item, the
|
46 |
|
|
procedure of my <code>-browsecmd</code> gets called
|
47 |
|
|
twice. However, I just want it to be called once.
|
48 |
|
|
<li> <a href=#general.destroy> [G.13] </a>
|
49 |
|
|
|
50 |
|
|
I get an error <i>"can't read data(-value): no such element in
|
51 |
|
|
array</i>" when I use the tixExFileSelectDialog.
|
52 |
|
|
</ul><p>
|
53 |
|
|
<DT><i><b>
|
54 |
|
|
Question About Porting to Specific Platforms/Software
|
55 |
|
|
</b></i><DD><ul>
|
56 |
|
|
<li> <a href=#port.1> [P.1] </a>
|
57 |
|
|
The configure script gave me strange errors.
|
58 |
|
|
<li> <a href=#port.tk41> [P.2] </a>
|
59 |
|
|
|
60 |
|
|
Does Tix 4.1 work with <b>Tk 4.1</b>
|
61 |
|
|
<li> <a href=#port.itcl> [P.3] </a>
|
62 |
|
|
Does Tix work with <b>Incr Tcl 2.0</b>?
|
63 |
|
|
<li> <a href=#port.expect> [P.4] </a>
|
64 |
|
|
|
65 |
|
|
How do I get Tix to work with <b>Expect</b>?
|
66 |
|
|
<li> <a href=#port.6> [P.5] </a>
|
67 |
|
|
<b>Solaris 2.4:</b>
|
68 |
|
|
Filenames in FileSelectBox are chopped off.
|
69 |
|
|
<li> <a href=#port.7> [P.6] </a>
|
70 |
|
|
Do I still need libXpm?
|
71 |
|
|
<li> <a href=#port.8> [P.7] </a>
|
72 |
|
|
<a name=coredump1>I get a coredump as soon as tixwish starts up.
|
73 |
|
|
</ul><p>
|
74 |
|
|
<DT><i><b>
|
75 |
|
|
Porting from Tix 3.6 to Tix 4.x
|
76 |
|
|
</b></i><DD><ul>
|
77 |
|
|
<li> <a href=#tix36to40.1> [X.1] </a>
|
78 |
|
|
What happened to the <code>tixInit</code> command?
|
79 |
|
|
<li> <a href=#tix36to40.2> [X.2] </a>
|
80 |
|
|
How do I set the schemes and fontsets in Tix 4.x?
|
81 |
|
|
<li> <a href=#tix36to40.3> [X.3] </a>
|
82 |
|
|
How do I choose the default TK color schemes and fontsets? Tix is
|
83 |
|
|
messing up the colors of my existing programs.
|
84 |
|
|
<li> <a href=#tix36to40.4> [X.4] </a>
|
85 |
|
|
I want the old bisque look of Tk 3.6. tk_bisque doesn't work.
|
86 |
|
|
</ul><p>
|
87 |
|
|
</DL>
|
88 |
|
|
<hr>
|
89 |
|
|
<h3>
|
90 |
|
|
Legal Issues
|
91 |
|
|
</h3>
|
92 |
|
|
<DL>
|
93 |
|
|
<DT> <b><a name=legal.1> [L.1] </a>
|
94 |
|
|
Is Tix free software?
|
95 |
|
|
</b><p>
|
96 |
|
|
<DD>
|
97 |
|
|
<b> ANSWER: </b>
|
98 |
|
|
|
99 |
|
|
Tix is distributed under the same license as Tcl/Tk (a.k.a. BSD
|
100 |
|
|
style license). Application developers can freely redistribute
|
101 |
|
|
Tix along with their products. <p>
|
102 |
|
|
|
103 |
|
|
We will continue to provide free technical support and
|
104 |
|
|
maintainence for Tix. However, to recover the development costs,
|
105 |
|
|
we would appreciate financial supports for the Tix user
|
106 |
|
|
community. If you like Tix and would like to make a donation to
|
107 |
|
|
the Tix Project, please send mail to <a
|
108 |
|
|
href="mailto:xpi@xpi.com">xpi@xpi.com</a>. <p>
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
<p>
|
112 |
|
|
</DL>
|
113 |
|
|
<hr>
|
114 |
|
|
<h3>
|
115 |
|
|
General Questions About Using The Tix Library
|
116 |
|
|
</h3>
|
117 |
|
|
<DL>
|
118 |
|
|
<DT> <b><a name=general.1> [G.1] </a>
|
119 |
|
|
What does the "<code>-disablecallback</code>"
|
120 |
|
|
option do?
|
121 |
|
|
</b><p>
|
122 |
|
|
<DD>
|
123 |
|
|
<b> ANSWER: </b>
|
124 |
|
|
|
125 |
|
|
Many Tix widgets have both a <code>-value</code> option and a
|
126 |
|
|
<code>-command</code> option. Any modification of the
|
127 |
|
|
<code>-value</code> will cause the <code>-command</code> callback
|
128 |
|
|
to be executed. Sometimes this is undesirable. For example,
|
129 |
|
|
calling "<code>config -value</code>" inside the callback procedure
|
130 |
|
|
will cause the callback to be re-entered and thus an infinite
|
131 |
|
|
recursion. <p>
|
132 |
|
|
|
133 |
|
|
The <code>-disablecallback</code> can be used to advoid this
|
134 |
|
|
problem. When this option is set, the <code>-command</code>
|
135 |
|
|
callback will not be executed even if the -value of a widget is
|
136 |
|
|
changed. Therefore, if you need to modify the -value of a widget
|
137 |
|
|
inside its callback, do this:
|
138 |
|
|
|
139 |
|
|
<blockquote><pre>
|
140 |
|
|
proc my_callback {w} {
|
141 |
|
|
$w config -disablecallback true
|
142 |
|
|
$w config value blah
|
143 |
|
|
$w config -disablecallback false
|
144 |
|
|
}
|
145 |
|
|
</pre></blockquote>
|
146 |
|
|
|
147 |
|
|
If you find this too troublesome, you can call the command tixSetSilent:
|
148 |
|
|
|
149 |
|
|
<blockquote><pre>
|
150 |
|
|
proc my_callback {w} {
|
151 |
|
|
tixSetSilent $w blah
|
152 |
|
|
}
|
153 |
|
|
</pre></blockquote>
|
154 |
|
|
|
155 |
|
|
<p>
|
156 |
|
|
<DT> <b><a name=general.2> [G.2] </a>
|
157 |
|
|
How do I set the width of the entry subwidget inside the tixControl widget?
|
158 |
|
|
</b><p>
|
159 |
|
|
<DD>
|
160 |
|
|
<b> ANSWER: </b>
|
161 |
|
|
|
162 |
|
|
You can use the option database or the -options flag to set the
|
163 |
|
|
configuration options of the subwidgets. E.g: <pre>
|
164 |
|
|
|
165 |
|
|
option add *TixControl*entry.width 10
|
166 |
|
|
</pre>
|
167 |
|
|
|
168 |
|
|
OR
|
169 |
|
|
|
170 |
|
|
<pre>
|
171 |
|
|
tixControl .c -options {
|
172 |
|
|
entry.width 10
|
173 |
|
|
}
|
174 |
|
|
</pre>
|
175 |
|
|
|
176 |
|
|
<p>
|
177 |
|
|
<DT> <b><a name=general.3> [G.3] </a>
|
178 |
|
|
What is the "<code>setslient</code>" method?
|
179 |
|
|
</b><p>
|
180 |
|
|
<DD>
|
181 |
|
|
<b> ANSWER: </b>
|
182 |
|
|
This is an obsolete method. You could use it to achieve the same
|
183 |
|
|
effect as the <code>-disablecallback</code> option.
|
184 |
|
|
<code>selsilent</code> used to be a widget command for the
|
185 |
|
|
ComboBox, Control, etc. It has been removed since Tix 4.0a4 and
|
186 |
|
|
replaced by the <code>tixSetSilent</code> command. Please note
|
187 |
|
|
that <code>tixSetSilent</code> is not a widget command but an
|
188 |
|
|
external procedure.
|
189 |
|
|
|
190 |
|
|
<p>
|
191 |
|
|
<DT> <b><a name=general.4> [G.4] </a>
|
192 |
|
|
Is there a Tix interface builder in the works?
|
193 |
|
|
</b><p>
|
194 |
|
|
<DD>
|
195 |
|
|
<b> ANSWER: </b>
|
196 |
|
|
Yes. But I don't know when it will be finished. (probably in 96).
|
197 |
|
|
|
198 |
|
|
<p>
|
199 |
|
|
<DT> <b><a name=general.5> [G.5] </a>
|
200 |
|
|
Can you tell me about the syntax of tixForm
|
201 |
|
|
</b><p>
|
202 |
|
|
<DD>
|
203 |
|
|
<b> ANSWER: </b>
|
204 |
|
|
Please see the file <a href="../man/Form.html">man/Form.html</a>
|
205 |
|
|
or <a href="../man/Form.n">man/Form.n</a>.
|
206 |
|
|
|
207 |
|
|
<p>
|
208 |
|
|
<DT> <b><a name=general.6> [G.6] </a>
|
209 |
|
|
|
210 |
|
|
I am not using the tixForm geometry manager, but it is giving me
|
211 |
|
|
errors about TixForm. What happened?
|
212 |
|
|
</b><p>
|
213 |
|
|
<DD>
|
214 |
|
|
<b> ANSWER: </b>
|
215 |
|
|
|
216 |
|
|
When you get error messages like this:
|
217 |
|
|
|
218 |
|
|
<pre> (TixForm) Error:Trying to use more than one geometry
|
219 |
|
|
manager for the same master window.
|
220 |
|
|
Giving up after 50 iterations.</pre>
|
221 |
|
|
|
222 |
|
|
Most likely, the problem is when using tixLabelFrame widgets, you
|
223 |
|
|
packed to the wrong frame: <p>
|
224 |
|
|
|
225 |
|
|
This is WRONG:
|
226 |
|
|
|
227 |
|
|
<pre> tixLabelFrame .d
|
228 |
|
|
button .d.b
|
229 |
|
|
pack .d.b </pre>
|
230 |
|
|
|
231 |
|
|
This is the correct way:
|
232 |
|
|
|
233 |
|
|
<pre> tixLabelFrame .d
|
234 |
|
|
set f [.d subwidget frame]
|
235 |
|
|
button $f.b
|
236 |
|
|
pack $f.b
|
237 |
|
|
pack .d </pre>
|
238 |
|
|
|
239 |
|
|
Remember you don't pack directly into a TixLabelFrame
|
240 |
|
|
widget. Instead, you should pack into its <code>frame</code>
|
241 |
|
|
subwidget.
|
242 |
|
|
|
243 |
|
|
<p>
|
244 |
|
|
<DT> <b><a name=general.7> [G.7] </a>
|
245 |
|
|
How do I generate the <code>tclIndex</code> file for Tix?
|
246 |
|
|
</b><p>
|
247 |
|
|
<DD>
|
248 |
|
|
<b> ANSWER: </b>
|
249 |
|
|
|
250 |
|
|
Tix <code>tclIndex</code> files cannot be generated using the
|
251 |
|
|
standard auto_mkindex procedure. You must use the tixindex program
|
252 |
|
|
in the <code>tools/</code> subdirectory in the Tix
|
253 |
|
|
distribution. The syntax is
|
254 |
|
|
<pre> tixindex *.tcl
|
255 |
|
|
</pre>
|
256 |
|
|
|
257 |
|
|
<p>
|
258 |
|
|
<DT> <b><a name=general.8> [G.8] </a>
|
259 |
|
|
Can I ignore the default arguments passed by the various
|
260 |
|
|
<code>-command</code> and <code>-broeswcmd</code> options?
|
261 |
|
|
</b><p>
|
262 |
|
|
<DD>
|
263 |
|
|
<b> ANSWER: </b>
|
264 |
|
|
You can use the <code>tixBreak</code> command. For example:
|
265 |
|
|
<pre> tixFileSelectDialog .c -command "puts foo; tixBreak" </pre>
|
266 |
|
|
|
267 |
|
|
<p>
|
268 |
|
|
<DT> <b><a name=general.9> [G.9] </a>
|
269 |
|
|
What does <code>tixWidgetDoWhenIdle</code> do?
|
270 |
|
|
</b><p>
|
271 |
|
|
<DD>
|
272 |
|
|
<b> ANSWER: </b>
|
273 |
|
|
|
274 |
|
|
It does the same thing as tixDoWhileIdle (and "after -idle"). The
|
275 |
|
|
difference is it takes its second argument as the name of a widget
|
276 |
|
|
and executes this command only if the widget exists: i.e.:
|
277 |
|
|
|
278 |
|
|
|
279 |
|
|
<pre> tixWidgetDoWhenIdle tixComboBox::Update $w blah blah ..</pre>
|
280 |
|
|
|
281 |
|
|
will execute tixComboBox::Update only if $w exists. $w may be
|
282 |
|
|
destroyed after tixWidgetDoWhenIdle is called but before an idle
|
283 |
|
|
event happens.
|
284 |
|
|
|
285 |
|
|
<p>
|
286 |
|
|
<DT> <b><a name=general.feature_req> [G.10] </a>
|
287 |
|
|
Why isn't such a feature in Tix? Will it be implemented?
|
288 |
|
|
</b><p>
|
289 |
|
|
<DD>
|
290 |
|
|
<b> ANSWER: </b>
|
291 |
|
|
|
292 |
|
|
Generally requests for new features are welcomed. You can send
|
293 |
|
|
your requests to <a href=mailto:tix@xpi.com> tix@xpi.com </a> and
|
294 |
|
|
we'll be happy to hear from you. <p>
|
295 |
|
|
|
296 |
|
|
We can't guarantee to implement the requested features
|
297 |
|
|
immediately. Usually it depends on how important the features. If
|
298 |
|
|
the feature is requested by more people, it will usually get done
|
299 |
|
|
faster.
|
300 |
|
|
|
301 |
|
|
However, some frequently requested features probably won't be
|
302 |
|
|
imlemented. Usually these features are cosmetic changes and:
|
303 |
|
|
|
304 |
|
|
<ul>
|
305 |
|
|
<li> they do not add new capability to the widgets
|
306 |
|
|
<li> they are not universally liked
|
307 |
|
|
<li> they confuse the user.
|
308 |
|
|
</ul>
|
309 |
|
|
|
310 |
|
|
<p>
|
311 |
|
|
Some examples are:
|
312 |
|
|
|
313 |
|
|
<ul>
|
314 |
|
|
|
315 |
|
|
<li> <b>Different foreground and background colors for the
|
316 |
|
|
NoteBook tabs</b>: having a lot of colors may antagonize the users
|
317 |
|
|
that are "color haters"; also, the different colors don't make it
|
318 |
|
|
easier for the user to locate the desired tab.
|
319 |
|
|
|
320 |
|
|
<li> <b>Ring-binder metaphore for the NoteBook widget</b>: a waste
|
321 |
|
|
of screen real estate.
|
322 |
|
|
|
323 |
|
|
<li> <b>Rows of tabs for the NoteBook widget</b>: the user may be
|
324 |
|
|
confused when the rows of tabs are switched. If you need to have a
|
325 |
|
|
lot of tabs for the notebook, use the ListNoteBook widget instead.
|
326 |
|
|
|
327 |
|
|
</ul>
|
328 |
|
|
|
329 |
|
|
|
330 |
|
|
<p>
|
331 |
|
|
<DT> <b><a name=general.softwares> [G.11] </a>
|
332 |
|
|
Who are using Tix in their software?
|
333 |
|
|
</b><p>
|
334 |
|
|
<DD>
|
335 |
|
|
<b> ANSWER: </b>
|
336 |
|
|
|
337 |
|
|
I have compiled a list of softwares that use Tix. See <a
|
338 |
|
|
href=http://www.xpi.com/tix/software.html>
|
339 |
|
|
http://www.xpi.com/tix/software.html</a>. (These are only the ones
|
340 |
|
|
that I have heard of, either from the authors themselves or from
|
341 |
|
|
the TCL FAQ. There should be more of them).
|
342 |
|
|
|
343 |
|
|
|
344 |
|
|
|
345 |
|
|
<p>
|
346 |
|
|
<DT> <b><a name=general.twice> [G.12] </a>
|
347 |
|
|
|
348 |
|
|
I am using a DirList widget. When the user clicks on an item, the
|
349 |
|
|
procedure of my <code>-browsecmd</code> gets called
|
350 |
|
|
twice. However, I just want it to be called once.
|
351 |
|
|
</b><p>
|
352 |
|
|
<DD>
|
353 |
|
|
<b> ANSWER: </b>
|
354 |
|
|
|
355 |
|
|
The <code>-browsecmd</code> procedure is triggered by three types
|
356 |
|
|
of events: <code><1></code>,
|
357 |
|
|
<code><ButtonRelease-1></code>, and
|
358 |
|
|
<code><B1-Motion></code>. When the user clicks on an entry,
|
359 |
|
|
a <code><1></code> and a
|
360 |
|
|
<code><ButtonRelease-1></code> event will happen in rapid
|
361 |
|
|
session, which causes your <code>-browsecmd</code> procedure to be
|
362 |
|
|
called twice. <p>
|
363 |
|
|
|
364 |
|
|
A crude fix for this problem is to ignore all the
|
365 |
|
|
<code><ButtonRelease-1></code> events. You can find out the
|
366 |
|
|
event that triggers the <code>-browsecmd</code> procedure by the
|
367 |
|
|
<code>tixEvent</code> command. Here is an example:
|
368 |
|
|
|
369 |
|
|
<blockquote><pre>
|
370 |
|
|
tixDirList .c -browsecmd Browse
|
371 |
|
|
|
372 |
|
|
proc Browse {args} {
|
373 |
|
|
if {[tixEvent type] == "<code><ButtonRelease-1></code>"} {
|
374 |
|
|
return
|
375 |
|
|
}
|
376 |
|
|
# ....
|
377 |
|
|
}
|
378 |
|
|
</pre></blockquote>
|
379 |
|
|
|
380 |
|
|
However, the above solution is not perfect. For example, if the
|
381 |
|
|
user clicks down the button at entry one, drags it over entries
|
382 |
|
|
two and three and release it on top of entry three, the following
|
383 |
|
|
events may be caused: <p>
|
384 |
|
|
|
385 |
|
|
<ol>
|
386 |
|
|
<li> <code><1></code> on entry one.
|
387 |
|
|
<li> <code><B1-Motion></code> on entry two.
|
388 |
|
|
<li> <code><ButtonRelease-1></code> on entry three.
|
389 |
|
|
</ol> <p>
|
390 |
|
|
|
391 |
|
|
Therefore, if you use the above method, the browse event on entry
|
392 |
|
|
three will be lost! <p>
|
393 |
|
|
|
394 |
|
|
To devise a better solution, it's better to understand the basic
|
395 |
|
|
design conventions of a Tix-based GUI. Suppose we have a list of
|
396 |
|
|
entries displayed in a listbox (or DirList, or HList). When the
|
397 |
|
|
user clicks on an entry, the GUI usually responds by displaying a
|
398 |
|
|
"<b>detailed view</b>" of the entry. For example, if we put a list
|
399 |
|
|
of file names in a listbox, when the user clicks on a file name,
|
400 |
|
|
we display the contents of the file in a text window. If the user
|
401 |
|
|
then clicks on another file name, the text window will load in the
|
402 |
|
|
contents of the new file. <p>
|
403 |
|
|
|
404 |
|
|
Now what happens if the user clicks on the same entry twice? Do we
|
405 |
|
|
reload the contents of the file into the text window? This is
|
406 |
|
|
usually unnecessary, inefficient and probably not what the user
|
407 |
|
|
wants to do. The Tix convention is, when the user clicks on the
|
408 |
|
|
same entry again, the detail view is not updated. If the user
|
409 |
|
|
wants to force an update (e.g, the user knows the file's contents
|
410 |
|
|
has been changed and wants to see the new version), he or she can
|
411 |
|
|
double-click on the entry and the application will respond by
|
412 |
|
|
redisplaying the detail view (reloading the file). <p>
|
413 |
|
|
|
414 |
|
|
To implement this policy, the Browse procedure should be modified
|
415 |
|
|
as the following:
|
416 |
|
|
|
417 |
|
|
<blockquote><pre>
|
418 |
|
|
proc Browse {args} {
|
419 |
|
|
global currentView
|
420 |
|
|
|
421 |
|
|
set ent [tixEvent value]
|
422 |
|
|
if {$ent == $currentView} {
|
423 |
|
|
# We have already displayed the detailed view of $ent.
|
424 |
|
|
#
|
425 |
|
|
return
|
426 |
|
|
} else {
|
427 |
|
|
set currentView $ent
|
428 |
|
|
DisplayDetail $ent
|
429 |
|
|
}
|
430 |
|
|
}
|
431 |
|
|
</pre></blockquote> <p>
|
432 |
|
|
|
433 |
|
|
<p>
|
434 |
|
|
<DT> <b><a name=general.destroy> [G.13] </a>
|
435 |
|
|
|
436 |
|
|
I get an error <i>"can't read data(-value): no such element in
|
437 |
|
|
array</i>" when I use the tixExFileSelectDialog.
|
438 |
|
|
</b><p>
|
439 |
|
|
<DD>
|
440 |
|
|
<b> ANSWER: </b>
|
441 |
|
|
|
442 |
|
|
If you use tixExFileSelectDialog like this:
|
443 |
|
|
|
444 |
|
|
<pre>
|
445 |
|
|
tixExFileSelectDialog .f -command foo
|
446 |
|
|
|
447 |
|
|
foo {filename} {
|
448 |
|
|
destroy .f
|
449 |
|
|
do some other stuff ...
|
450 |
|
|
}
|
451 |
|
|
</pre>
|
452 |
|
|
|
453 |
|
|
it will cause a Tcl error because the dialog assumes that it still
|
454 |
|
|
exists after calling your command. This usually result in errors like
|
455 |
|
|
this:
|
456 |
|
|
|
457 |
|
|
<pre>
|
458 |
|
|
can't read "data(-value)": no such element in array
|
459 |
|
|
while executing
|
460 |
|
|
"set data(-selection) $data(-value)..."
|
461 |
|
|
(procedure "tixComboBox::SetValue" line 30)
|
462 |
|
|
</pre>
|
463 |
|
|
|
464 |
|
|
|
465 |
|
|
This "feature" is built into many Tix widgets and can't be fixed
|
466 |
|
|
easily. To work around the problem, never destroy widgets inside
|
467 |
|
|
-command calls. Usually you should unmap toplevel windows
|
468 |
|
|
instead. If you must destroy widgets, do it with an "after"
|
469 |
|
|
command. For example, the foo procedure should be rewritten as:
|
470 |
|
|
|
471 |
|
|
<pre>
|
472 |
|
|
foo {filename} {
|
473 |
|
|
wm withdraw .f
|
474 |
|
|
do some other stuff ...
|
475 |
|
|
|
476 |
|
|
after idle {if [winfo exists .f] {destroy .f}}
|
477 |
|
|
}
|
478 |
|
|
</pre>
|
479 |
|
|
|
480 |
|
|
Execute the "after" command at the very end of the
|
481 |
|
|
-command. Otherwise the idle handler may be activated by some
|
482 |
|
|
"update" calls.
|
483 |
|
|
|
484 |
|
|
<p>
|
485 |
|
|
</DL>
|
486 |
|
|
<hr>
|
487 |
|
|
<h3>
|
488 |
|
|
Question About Porting to Specific Platforms/Software
|
489 |
|
|
</h3>
|
490 |
|
|
<DL>
|
491 |
|
|
<DT> <b><a name=port.1> [P.1] </a>
|
492 |
|
|
The configure script gave me strange errors.
|
493 |
|
|
</b><p>
|
494 |
|
|
<DD>
|
495 |
|
|
<b> ANSWER: </b>
|
496 |
|
|
The problem may be you have several operating systems sharing the
|
497 |
|
|
same file system. Some people encounter error messages like this:
|
498 |
|
|
|
499 |
|
|
<blockquote><pre>
|
500 |
|
|
# ./configure --prefix=/usr/vendor/tcl
|
501 |
|
|
loading cache ./config.cache
|
502 |
|
|
checking for a BSD compatible install... /usr/bin/installbsd -c
|
503 |
|
|
checking for ranlib... ranlib
|
504 |
|
|
checking how to run the C preprocessor... cc -E
|
505 |
|
|
checking for unistd.h... ./configure[603]: "${ac_cv_header_$ac_safe+set}": bad
|
506 |
|
|
substitution
|
507 |
|
|
</pre></blockquote>
|
508 |
|
|
|
509 |
|
|
The problem is at line 2, configure loaded in ./config.cache,
|
510 |
|
|
which may have been created by a different operating system, with
|
511 |
|
|
settings only usuable for that operating system. To get around
|
512 |
|
|
this, you should type
|
513 |
|
|
|
514 |
|
|
<blockquote><pre>
|
515 |
|
|
make distclean
|
516 |
|
|
./configure
|
517 |
|
|
make all
|
518 |
|
|
</pre></blockquote>
|
519 |
|
|
|
520 |
|
|
<p>
|
521 |
|
|
<DT> <b><a name=port.tk41> [P.2] </a>
|
522 |
|
|
|
523 |
|
|
Does Tix 4.1 work with <b>Tk 4.1</b>
|
524 |
|
|
</b><p>
|
525 |
|
|
<DD>
|
526 |
|
|
<b> ANSWER: </b>
|
527 |
|
|
|
528 |
|
|
Yes, just enable the "Tk 4.1 ..." option in the setup program. It
|
529 |
|
|
will also compile Tix in a dynamic lobrary.
|
530 |
|
|
|
531 |
|
|
|
532 |
|
|
<p>
|
533 |
|
|
<DT> <b><a name=port.itcl> [P.3] </a>
|
534 |
|
|
Does Tix work with <b>Incr Tcl 2.0</b>?
|
535 |
|
|
</b><p>
|
536 |
|
|
<DD>
|
537 |
|
|
<b> ANSWER: </b>
|
538 |
|
|
|
539 |
|
|
Yes just enable the "Itcl 2.0 ..." option in the setup
|
540 |
|
|
program. Make sure you have ITcl 2.0 installed. Beta versions will
|
541 |
|
|
*NOT* work. Also make sure you have installed the source tree of
|
542 |
|
|
ITcl 2.0 in the same directory where you install the Tix source
|
543 |
|
|
tree.
|
544 |
|
|
|
545 |
|
|
<p>
|
546 |
|
|
<DT> <b><a name=port.expect> [P.4] </a>
|
547 |
|
|
|
548 |
|
|
How do I get Tix to work with <b>Expect</b>?
|
549 |
|
|
</b><p>
|
550 |
|
|
<DD>
|
551 |
|
|
<b> ANSWER: </b>
|
552 |
|
|
From Paul Schmidt (kuato@netcom.com):
|
553 |
|
|
|
554 |
|
|
<blockquote>
|
555 |
|
|
|
556 |
|
|
I have integrated Tcl7.4, Tk4.0, Expect-5.19 and Tix4.0 on Linux
|
557 |
|
|
1.2.13 (ELF) and Solaris 2.4. It isn't too hard. For an
|
558 |
|
|
expectk+Tix binary you need to add a call to Tix_Init in
|
559 |
|
|
exp_main_tk.c. If you can find the call to Tk_Init then just
|
560 |
|
|
cut&paste and replace it with Tix_Init. Do the same if you want a
|
561 |
|
|
Tk+Tix window shell in TkAppInit.c. Worked like a charm. If you
|
562 |
|
|
have any problems just holler.
|
563 |
|
|
|
564 |
|
|
</blockquote>
|
565 |
|
|
|
566 |
|
|
|
567 |
|
|
<p>
|
568 |
|
|
<DT> <b><a name=port.6> [P.5] </a>
|
569 |
|
|
<b>Solaris 2.4:</b>
|
570 |
|
|
Filenames in FileSelectBox are chopped off.
|
571 |
|
|
</b><p>
|
572 |
|
|
<DD>
|
573 |
|
|
<b> ANSWER: </b>
|
574 |
|
|
<b>Problem:</b>
|
575 |
|
|
<blockquote>
|
576 |
|
|
|
577 |
|
|
With Tix4.0a7 (and also with Tix4.0a6) on Solaris 2.4, when
|
578 |
|
|
running the widget demo, in tixFileSelectBox, in the two scolling
|
579 |
|
|
lists (for Files an Directories), some of the file and directory
|
580 |
|
|
names have their first 2 letters chopped off. And some files are
|
581 |
|
|
repeated.
|
582 |
|
|
|
583 |
|
|
</blockquote>
|
584 |
|
|
|
585 |
|
|
<b>Solution:</b> tixwish has some conflicts with /usr/ucblib/libucb.so.1
|
586 |
|
|
and you should not linke it tixwish (you don't need it). Here is
|
587 |
|
|
a solution provided by Charles L Ditzel
|
588 |
|
|
(<i>charles@hanami.cyberspace.com</i>):
|
589 |
|
|
|
590 |
|
|
<blockquote>
|
591 |
|
|
To fix the problem I was having, all I did was:
|
592 |
|
|
|
593 |
|
|
<pre>
|
594 |
|
|
unsetenv LD_LIBRARY_PATH
|
595 |
|
|
set my PATH to something basic like:
|
596 |
|
|
/usr/bin:/usr/ccs/bin:/bin:/usr/openwin/bin:/opt/SUNWspro/bin
|
597 |
|
|
removed config.cache
|
598 |
|
|
./configure
|
599 |
|
|
make clean
|
600 |
|
|
make
|
601 |
|
|
</pre>
|
602 |
|
|
|
603 |
|
|
and now it works!! Must have been something in my old
|
604 |
|
|
<code>PATH</code> or <code>LD_LIBRARY_PATH</code> that was
|
605 |
|
|
causing it to pick up <code>/usr/ucblib/libucb.so</code>.
|
606 |
|
|
|
607 |
|
|
</blockquote>
|
608 |
|
|
|
609 |
|
|
<p>
|
610 |
|
|
<DT> <b><a name=port.7> [P.6] </a>
|
611 |
|
|
Do I still need libXpm?
|
612 |
|
|
</b><p>
|
613 |
|
|
<DD>
|
614 |
|
|
<b> ANSWER: </b>
|
615 |
|
|
|
616 |
|
|
No, now Tix has its own XPM file reader. You no longer need libXpm.
|
617 |
|
|
|
618 |
|
|
|
619 |
|
|
<p>
|
620 |
|
|
<DT> <b><a name=port.8> [P.7] </a>
|
621 |
|
|
<a name=coredump1>I get a coredump as soon as tixwish starts up.
|
622 |
|
|
</b><p>
|
623 |
|
|
<DD>
|
624 |
|
|
<b> ANSWER: </b>
|
625 |
|
|
|
626 |
|
|
|
627 |
|
|
Try to get a backtrace of the stack when the core dump happens
|
628 |
|
|
(with a debugger, for example). If the core dump happens right
|
629 |
|
|
inside the call to <code>Tk_ConfigureWidget()</code> inside the
|
630 |
|
|
file <code>tixInit.c</code>, then the problem is because you
|
631 |
|
|
compiled <code>libtk.a</code> and <code>libtix.a</code> with
|
632 |
|
|
different versions of the Th header file
|
633 |
|
|
<code>tk.h</code>. Delete all the <code>.o</code> files from the
|
634 |
|
|
src directory of Tix, fix the Makefile so that now you can
|
635 |
|
|
compile <code>libtix.a</code> with the same tk.h that you used to
|
636 |
|
|
compile <code>libtk.a</code>.
|
637 |
|
|
|
638 |
|
|
|
639 |
|
|
<p>
|
640 |
|
|
</DL>
|
641 |
|
|
<hr>
|
642 |
|
|
<h3>
|
643 |
|
|
Porting from Tix 3.6 to Tix 4.x
|
644 |
|
|
</h3>
|
645 |
|
|
<DL>
|
646 |
|
|
<DT> <b><a name=tix36to40.1> [X.1] </a>
|
647 |
|
|
What happened to the <code>tixInit</code> command?
|
648 |
|
|
</b><p>
|
649 |
|
|
<DD>
|
650 |
|
|
<b> ANSWER: </b>
|
651 |
|
|
You don't need to use it anymore. It is provided in Tix 4.x only for
|
652 |
|
|
backward compatibility.
|
653 |
|
|
|
654 |
|
|
<p>
|
655 |
|
|
<DT> <b><a name=tix36to40.2> [X.2] </a>
|
656 |
|
|
How do I set the schemes and fontsets in Tix 4.x?
|
657 |
|
|
</b><p>
|
658 |
|
|
<DD>
|
659 |
|
|
<b> ANSWER: </b>
|
660 |
|
|
You can set the color schemes and fontsets using the standard X
|
661 |
|
|
resource database (.Xdefaults file). You can add these two lines
|
662 |
|
|
in the user's .Xdefaults file: <pre>
|
663 |
|
|
|
664 |
|
|
*TixScheme: Gray
|
665 |
|
|
*TixFontSet: 14Point </pre>
|
666 |
|
|
|
667 |
|
|
If you want to switch color schemes and fontsets during run time,
|
668 |
|
|
you can issue the following commands: <pre>
|
669 |
|
|
tix config -scheme Gray -fontset 14Point
|
670 |
|
|
</pre>
|
671 |
|
|
|
672 |
|
|
Please read the <a href=../man/tix.html>tix</a> manual page for
|
673 |
|
|
more details
|
674 |
|
|
|
675 |
|
|
<p>
|
676 |
|
|
<DT> <b><a name=tix36to40.3> [X.3] </a>
|
677 |
|
|
How do I choose the default TK color schemes and fontsets? Tix is
|
678 |
|
|
messing up the colors of my existing programs.
|
679 |
|
|
</b><p>
|
680 |
|
|
<DD>
|
681 |
|
|
<b> ANSWER: </b>
|
682 |
|
|
Add these two lines in your .Xdefaults:<pre>
|
683 |
|
|
|
684 |
|
|
*TixScheme: TK
|
685 |
|
|
*TixFontSet: TK </pre>
|
686 |
|
|
|
687 |
|
|
<p>
|
688 |
|
|
<DT> <b><a name=tix36to40.4> [X.4] </a>
|
689 |
|
|
I want the old bisque look of Tk 3.6. tk_bisque doesn't work.
|
690 |
|
|
</b><p>
|
691 |
|
|
<DD>
|
692 |
|
|
<b> ANSWER: </b>
|
693 |
|
|
|
694 |
|
|
The Tix widgets are not compatible with tk_bisque. If you want a
|
695 |
|
|
bisque-ish look you can add to your .Xdefaults file the following
|
696 |
|
|
line:<pre>
|
697 |
|
|
*TixScheme: Bisque</pre>
|
698 |
|
|
|
699 |
|
|
<p>
|
700 |
|
|
</DL>
|