|
|
1 | (22) |
|
|
1 | (1) |
|
|
2 | (1) |
|
What Makes Tcl and Tk Different? |
|
|
3 | (2) |
|
|
5 | (1) |
|
|
6 | (17) |
|
Installing Tcl and Tk on Linux |
|
|
6 | (1) |
|
Installing Tcl and Tk on Windows |
|
|
7 | (6) |
|
Installing Tcl and Tk on OS X |
|
|
13 | (5) |
|
Installing Tcl and Tk from Source |
|
|
18 | (5) |
|
|
23 | (10) |
|
|
23 | (2) |
|
Executing Tcl Commands Interactively |
|
|
25 | (2) |
|
Creating Tcl Command Files |
|
|
27 | (6) |
|
|
33 | (26) |
|
|
33 | (1) |
|
|
34 | (14) |
|
|
35 | (1) |
|
|
36 | (2) |
|
|
38 | (3) |
|
|
41 | (1) |
|
Grouping with Double Quotes |
|
|
42 | (1) |
|
|
42 | (1) |
|
|
43 | (3) |
|
|
46 | (2) |
|
|
48 | (2) |
|
Basic Mathematical Operators |
|
|
50 | (2) |
|
Conditional Execution: The if Command |
|
|
52 | (4) |
|
Analyzing the Guessing Numbers Program |
|
|
56 | (3) |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
57 | (2) |
|
Strings, Strings, Everywhere Strings! |
|
|
59 | (28) |
|
|
59 | (1) |
|
|
60 | (2) |
|
|
62 | (6) |
|
|
63 | (2) |
|
|
65 | (1) |
|
|
66 | (2) |
|
|
68 | (8) |
|
The length and bytelength Options |
|
|
68 | (1) |
|
|
68 | (1) |
|
The first and last Options |
|
|
69 | (1) |
|
|
70 | (1) |
|
|
71 | (2) |
|
|
73 | (3) |
|
|
76 | (2) |
|
|
76 | (1) |
|
|
76 | (1) |
|
|
77 | (1) |
|
|
78 | (1) |
|
|
78 | (5) |
|
Looping with the while Command |
|
|
79 | (2) |
|
Iterative Loops: The for Command |
|
|
81 | (2) |
|
|
83 | (4) |
|
|
83 | (1) |
|
|
84 | (1) |
|
|
85 | (2) |
|
|
87 | (28) |
|
|
87 | (1) |
|
|
88 | (1) |
|
|
89 | (1) |
|
|
90 | (1) |
|
|
90 | (1) |
|
|
91 | (3) |
|
Accessing Specific List Elements |
|
|
92 | (2) |
|
|
94 | (2) |
|
|
94 | (1) |
|
|
95 | (1) |
|
Searching and Sorting Lists |
|
|
96 | (6) |
|
|
96 | (3) |
|
|
99 | (3) |
|
Additional List Operations |
|
|
102 | (2) |
|
|
102 | (1) |
|
|
103 | (1) |
|
Looping with the foreach Command |
|
|
104 | (1) |
|
Conditional Execution: The switch Command |
|
|
105 | (3) |
|
Interrupting Loop Execution |
|
|
108 | (2) |
|
Analyzing Playing Blackjack |
|
|
110 | (5) |
|
|
110 | (2) |
|
|
112 | (1) |
|
|
113 | (2) |
|
Creating and Using Arrays |
|
|
115 | (18) |
|
|
115 | (1) |
|
The Differences Between Arrays and Lists |
|
|
116 | (1) |
|
|
117 | (7) |
|
Getting Information about Arrays |
|
|
118 | (2) |
|
Converting Lists to Arrays |
|
|
120 | (1) |
|
Converting Arrays to Lists |
|
|
121 | (1) |
|
Retrieving Array Elements |
|
|
122 | (1) |
|
|
123 | (1) |
|
|
124 | (4) |
|
Dealing with Exceptions: The catch Command |
|
|
124 | (2) |
|
Raising Errors: The error Command |
|
|
126 | (2) |
|
|
128 | (1) |
|
Analyzing What's the Word? |
|
|
129 | (4) |
|
|
129 | (1) |
|
|
130 | (1) |
|
|
131 | (2) |
|
|
133 | (12) |
|
|
133 | (1) |
|
|
134 | (1) |
|
|
135 | (4) |
|
Defining Procedures with Default Values |
|
|
136 | (1) |
|
Defining Procedures with Variable Arguments |
|
|
137 | (2) |
|
Understanding Variable and Procedure Scope |
|
|
139 | (3) |
|
|
142 | (3) |
|
|
142 | (1) |
|
|
143 | (1) |
|
|
144 | (1) |
|
Accessing Files and Directories |
|
|
145 | (26) |
|
|
145 | (2) |
|
Opening and Closing Files |
|
|
147 | (4) |
|
|
151 | (5) |
|
Using gets for File Input |
|
|
151 | (2) |
|
Using read for File Input |
|
|
153 | (3) |
|
|
156 | (3) |
|
|
156 | (1) |
|
Formatting Output with format |
|
|
157 | (2) |
|
Moving the File Pointer: Random Access I/O |
|
|
159 | (6) |
|
|
164 | (1) |
|
|
165 | (6) |
|
|
165 | (2) |
|
|
167 | (2) |
|
|
169 | (2) |
|
Understanding Tk Programming |
|
|
171 | (10) |
|
|
171 | (2) |
|
Components of a Tk Application |
|
|
173 | (1) |
|
|
174 | (1) |
|
Understanding Event-Driven Programming |
|
|
175 | (1) |
|
|
175 | (2) |
|
|
177 | (4) |
|
|
181 | (28) |
|
|
181 | (2) |
|
Packed and Ready: The pack Geometry Manager |
|
|
183 | (2) |
|
Button, Button, Who's Got the Button? |
|
|
185 | (12) |
|
|
186 | (3) |
|
|
189 | (5) |
|
|
194 | (3) |
|
|
197 | (3) |
|
Creating a Basic Menu Bar |
|
|
198 | (2) |
|
Binding Commands to Events |
|
|
200 | (2) |
|
|
202 | (1) |
|
|
203 | (6) |
|
|
203 | (3) |
|
|
206 | (2) |
|
|
208 | (1) |
|
Windows, Frames, and Messages |
|
|
209 | (30) |
|
|
209 | (2) |
|
On the Grid: The Grid Geometry Manager |
|
|
211 | (14) |
|
|
211 | (3) |
|
|
214 | (1) |
|
|
215 | (3) |
|
Spanning Rows and Columns |
|
|
218 | (1) |
|
Operating on Rows and Columns |
|
|
219 | (6) |
|
|
225 | (4) |
|
|
226 | (1) |
|
|
227 | (2) |
|
|
229 | (1) |
|
|
229 | (3) |
|
|
232 | (2) |
|
|
234 | (5) |
|
|
234 | (3) |
|
|
237 | (1) |
|
|
238 | (1) |
|
Entry and Spinbox Widgets |
|
|
239 | (12) |
|
|
239 | (2) |
|
Features of the Entry and Spinbox Widgets |
|
|
241 | (1) |
|
Entry and Spinbox Attributes |
|
|
241 | (2) |
|
|
243 | (2) |
|
Building a Better Message Box |
|
|
245 | (1) |
|
Analyzing Mad Libs Revista |
|
|
246 | (5) |
|
|
246 | (2) |
|
|
248 | (2) |
|
|
250 | (1) |
|
|
251 | (20) |
|
|
251 | (2) |
|
|
253 | (3) |
|
Selecting Listbox Content |
|
|
256 | (8) |
|
Setting the Selection Mode |
|
|
257 | (1) |
|
Determining the Selected Items |
|
|
258 | (3) |
|
Selecting Items Programmatically |
|
|
261 | (3) |
|
|
264 | (7) |
|
|
264 | (3) |
|
|
267 | (2) |
|
|
269 | (2) |
|
Scrollbar, Scale, and Text Widgets |
|
|
271 | (34) |
|
|
271 | (1) |
|
Using the Scrollbars to Move the Viewport |
|
|
272 | (8) |
|
|
273 | (5) |
|
Probing the scrollbar Protocol |
|
|
278 | (2) |
|
|
280 | (2) |
|
|
282 | (1) |
|
|
282 | (9) |
|
|
283 | (4) |
|
Adding and Populating a Menu |
|
|
287 | (4) |
|
|
291 | (8) |
|
|
291 | (3) |
|
|
294 | (3) |
|
|
297 | (2) |
|
|
299 | (6) |
|
|
299 | (3) |
|
|
302 | (2) |
|
|
304 | (1) |
|
|
305 | (40) |
|
|
305 | (3) |
|
|
308 | (30) |
|
|
309 | (2) |
|
|
311 | (27) |
|
Analyzing Got the Picture? |
|
|
338 | (7) |
|
|
338 | (5) |
|
|
343 | (1) |
|
|
344 | (1) |
Appendix A TCL Command Summary |
|
345 | (4) |
Appendix B TK Command Summary |
|
349 | (2) |
Index |
|
351 | |