Looking for 2nd edition errata?
10 9 8 7 6 5 4 3
There are three classes of errors :-(
fixed
font when they should be.
If you see an error not listed here or in the 2nd printing errata you can help me out by sending me some mail about it.
On page xxxvi my old email address is given. Mail to that address will bounce. You will always be able to reach me as welch@acm.org. Xerox PARC was a wonderful place to work, but the opporunity to work with Ousterhout in the Tcl/Tk group at Sun was too good an opportunity to pass up.
atan2
has some font errors with the parentheses.
glob
command is incorrectly listed as being described in this chapter.
Also on page 19, the otherargs
should be surrounded by question marks to indicate it is optional.
set, unset, info, list, lindex, llength, lrange, lappend, linsert, lreplace, lsearch, lsort, concat, join, split, array.
On page 34, the first paragraph should end:
"that is currently at the specified index"
On page 35, Example 3-9 can use the end
keyword in its use of lindex
instead of computing the last index with expr
and llength
.
On page 38, there is a font error for id
in the array nextelement
description.
scan
command.
On page 44 the reference to Example 1-11 should be to Example 1-12, and it should include the page number (9).
On page 51 in the first paragraph of the Scope section there is also a space missing at the end of the second sentence, just before "There is".
file, puts, gets, flush, exit, pid,
and the env
array for environment variables.
On page 65 the description of file extension
should be clearer that the dot is included in the return value.
pattern
in the description of info vars
On page 78 there is a font error for eval
in the second sentence of the Command Evaluation section.
On page 84 there is a space missing before "Goes into" in the first entry of Table 8-4.
Library_UpdateIndex
On page 93 there are font errors for tk.tcl
and auto_path
.
On page 98 the word "is" is missing from the third sentence of the second paragraph of section Naming Tk Widgets
On page 100 the page numbers for canvas
and entry
are slightly wrong. They should be 235 and 185, respectively.
On page 101 the description of the tk
command should not reference color model, which went away late in Tk 4.0.
entry
is mispelled "rntry".
On page 105 in Example 11-1, eof
is mispelled "eeof".
On page 106 the phrase "the top frame" should be "the .top
frame".
On page 124 there is an extra "is" in the second sentence of the Anchoring section.
On page 130 the discussion of the place
command should mention that the absolute and relative width and size parameters (e.g., -width and -relwidth) are additive. You can make a window slightly larger or smaller than another by specifying both.
On page 137 Table 13-1 lists the Keymap
event, which is no long supported.
On page 138 there is a font error for KeyPress
in the first paragraph.
On page 144 Table 13-3 lists the %D
substitution, which is no long supported.
On page 156 Table 14-3 omits the insert
and postcascade
menu operations.
On page 157 there is a font error for index
and pattern
in the left column of Table 14-4. Also in Table 14-4 the keyword end
is omitted, which is a synonym for last
.
On page 169 the word "is" is missing from the very last sentence.
label
is referenced instead of frame
in the borderWidth
and cursor
rows.
On page 175 the use of \n
in text to create multi-line labels and buttons should be described.
On page 178 in Table 16-5 the term "text" is used instead of "widget" in the borderWidth
entry.
On page 183 Table 16-8 is missing the elementBorderWidth
attribute. Table 16-9 is missing the delta
operation.
On page 183 there are font errors in Table 16-9 for set
in the get
row, and for arrow2
in the identify
row.
focus window
description omits the optional -force
flag that can forcibly take focus from another application.
On page 216 the first regsub
pattern is wrong. It should be {^\.\./?}
, but the \.
got mapped into a superscript period by accident.
1.end
mark have changed to be the newline character instead of the character just before the newline.
On page 220 the insert
operation can take multiple string tagList
arguments.
On page 221 the description of - count lines
should read "before the index". Also on page 221 the example defines a mark at the "beginning of the word", not the beginning of the line.
On page 222 the last example should have the two tags in a list:
{someTag someOtherTag}
On page 223 the -wrap
attribute is omitted from Table 19-3.
On page 231 the bindings for the Cut, Copy, and Paste function keys are omitted. Those bindings manipulate the CLIPBOARD
selection. Also in Table 19-5, the binding for delete word should be Meta-Delete
, and the binding for Control-x
should be removed.
On page 232 the insert
description does not list the ability to insert multiple strings with different tags.
On page 232 the search
description is not quite correct. Instead of supplying an optional varName
argument, use the -count varName
option to find out how many characters match the pattern. There is a -nocase
option for case insensitive matching. There is no -nowrap
option; instead you can supply an optional stopIndex
.
On page 233 the tag configure, window cget,
and window names
operations are omitted. In the tag lower
row, the word "before" should be "below".
On page 234 Table 19-7 omits the tabs, exportSelection, height, highlightBackground,
and takeFocus
attributes.
arc
style arcs is wrong, and so is Example 20-5 on page 242. They incorrectly use -fill
to specify the color for arc
style arcs. The -outline
attribute to specifies the color in this case.
On page 242 Table 20-1 omits the -outlinestipple
attribute.
On page 248 Table 20-6 omits the -width
and -outline
attributes for canvas polygon items that support outlines.
On page 253 the SetOfLabeledEntries
command invocation has a typo. The command should read:
SetOfLabeledEntries $top.c.canvas $labels
On page 254 the last sentence before Table 20-11 should say:
$t
is a canvas item ID or tag.
On page 255 there is a font error in the entry for the create
operation.
On page 256 the xview
and xview
descriptions are incomplete. These standard operations have several variations that are described correctly in Table 19-6.
On page 258 the last row of the table should use "Width", not "Widget".
On page 259 the description of width
incorrectly talks about characters for text. The width of a canvas is always specified in screen units.
--
option to clipboard append
that is required if the data
begins with a dash.
after idle
command. This runs a command the next time idle handlers are invoked.
On page 272 there is a font error for $
and [ ]
in the last sentence before the Using Sender section.
On page 274 the phrase "as separate arguments" should be "as a separate argument" in the last sentence of the second paragraph.
width
and relief
attributes.
On page 281 in Table 23-2 the list of widgets should use "and" instead of "or" in the description of the borderWidth
attribute.
There is a font error for borderWidth
in the bd
description.
In the description of activeBorderWidth
the term "border width" should be two words.
In the description of activeRelief
there is an extra "a".
Also on page 281 the The Focus Highlight section should reference the highlightBackground
attribute.
The term "width" should be used instead of "widget" in the last sentence of the first paragraph.
Table 23-3 omits the highlightBackground
attribute.
highlightBackground
attribute.
On page 288 the behavior of failed color allocations is wrong. Tk allocates the closest possible color instead of switching to a monochrome color model.
On page 288 Table 24-2 omits the best
visual, which tells Tk to select the best visual for a given depth.
On page 290 first sentence of the second paragraph should read "that the Tk library parses".
Also in this paraphraph, there is a font error for bitmap.
On page 292 the list of image formats supported by the photo
image type should list PPM, GIF,
and PGM
. You should also be able to find XPM
and JPEG
format readers in the Tcl archive if not in the main Tk release.
On page 292 the first sentence of the second paragraph should use "when", not "with".
The first sentence of the third paragraph should end "operate on it".
On page 293 the -decimate
option to copy has been changed to -subsample
.
catch
is mispelled "ccatch".
On page 301 the default resizing behavior is incorrectly described. Windows are resizable by default, and you can control this with the new wm resizable
command.
On page 308 the first regsub
pattern should be:
{\(nil\)}
wm geometry
command is missing its second argument, a dot.
This section should describe the new wm resizable
command that controls the user's ability to resize a window interactively.
On page 311 Table 26-1 omits the wm resizable
command.
On page 313 Table 26-4 omits the wm colormapwindows
command.
On page 315 the second paragraph should use winfo exists
instead of window exists
.
The third paraghraph is missing "of the" in the second sentence.
The second paragraph of the Size section should contain "more or less", not "more of less".
On page 318 Table 26-10 omits the -displayof win
option to the winfo atom, winfo atomname,
and winfo pathname
commands.
Table 26-11 omits the colormapfull
and screenvisual
operations.
On page 319 the tk colormodel
operation is described, but this no longer exists. I use the following procedure to emulate this useful command:
rename tk tk-orig proc tk { option args } { switch -- $option { colormodel { if {[winfo depth [lindex $args 0] > 4} { return color } else { return monochrome } } default { return [eval {tk-orig $option} $args] } } }
This chapter fails to mention the following new winfo
operations: pointerx, pointery, pointerxy, server
and viewable
. The first three return the mouse coordinates and winfo server
returns the version string of the X server. winfo viewable
is an improvement on winfo ismapped
because it returns true if the window and all its ancestors are mapped.
On page 326 the text for the $f.cmd.l
label should be Command:
. The colon is missing.
if
clause is truncated. The last few lines of that example should read:
if [file exists $basename-mono] { if [catch {option readfile $basename-mono $level} err] { Status "Error in $basename-mono: $err" } }
This example uses tk colormodel
and so the description should reference the emulation of this command.
On page 331 "If" is missing from the start of the third sentence of the first paragraph.
On page 335 wm
is mispelled wwm
in Example 28-7.
Tcl_Main
changed. It takes a third argument that is the application init procedure to call (e.g., Tcl_AppInit
). On page 341 Example 29-1 does not reflect this change.
Tk_Main
changed. It takes a third argument that is the application init procedure to call (e.g., Tcl_AppInit
). On page 354 Example 30-1 does not reflect this change.
On page 363 the incorrect man page is cited for the Timer Events section. It should be the TimerHndler
man page.
On page 365 in the Geometry Management section the third paragraph should begin with "The Tk_MaintainGeometry
procedure arranges ...".
The fourth paragraph of that section should begin with "The Tk_SetGrid
call enables ...".
On page 379 the word "button" is used in the comments of Example 31-7 instead of "widget" (or "clock").
On page 381 the second sentence should say "a focus highlight", not "and focus highlight".
simple_interactor
in the last paragraph.
On page 397 there is a font error for send
in the first paragraph.
On page 399 in the Connection Setup section the fourth sentence should begin with "The connection uses ...".
On page 401 there is a comma missing from the list of procedures in the first paragraph.
On page 403 Example 32-4 does not pass Tcl_AppInit
to the Tk_Main
procedure.
bindtags
in the first paragraph of the Bindings section.
On page 409 there is a font error for focus
in the first paragraph of the Focus section.
On page 410 there is a font error for padX
and padY
in the second paragraph of the Internal Button Padding section.
On page 411 the Menus section should reference the new insert
and postcascade
operations.
On page 412 Table 33-1 should list the new highlightBackground
color.