Mastering Perl/Tk by Nancy Walsh, Stephen Lidie The following errata were corrected in the 3/04 reprint: Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem {32} lines 4-5; "which widget should be placed after your new widget." NOW READS: "which widget your new widget should be placed after." {38} In the top portion of code sample, the line $i = 0; HAS BEEN DELETED. {39} In the listing: lines 24 (my $b =...) to 26 ($b->packForget;) HAVE BEEN DELETED. {40} In the listing: last lines in procedure "addwidget" ($top->Button(...): The line "-anchor => $anchordirs[$count]" HAS BEEN ADDED after the '-font' line. {68} last if statement in example code; if ($rightspring ne '') { push (@args, ('-rightspring', $rightspring)); } NOW READS: if ($leftspring ne '') { push (@args, ('-leftspring', $leftspring)); } {90} In last paragraph of section: "Using -relief with -indicator => 0 is..." NOW READS: "... -indicatoron => 0 ...". {95}In the listing: line 13 "$_->pack('forget')" NOW READS : "$->packForget". [96] Example of disabling a Button, use cget() rather than configure() to fetch an option value. Line 5 of the code sample NOW READS: -command => sub {my $state = $exit_b->cget(-state); {113} Description of -foreground option NOW READS: Changes the text of the Label (or the bitmap) to color. {116} In the sample code: "-textvariable => $message,)" an extraneous trailing comma HAS BEEN DELETED. {151} List of options: "-takefocus => 0|1|undef", the default "undef" NOW APPEARS in bold. {178} First paragraph, list of bindings: "Invokes...", A space HAS BEEN INSERTED between "" and "Invokes". (Also for the other three lines in that section.) {204} -image option; "See Chapter 3" NOW READS: "See Chapter 17" {214} The example $c->find('withtag', '(a&&!b)|(!a&&b)') was missing one '|'. It NOW READS: $c->find('withtag', '(a&&!b)||(!a&&b)'). {216} Section "Getting Tags from a Specific Item": "If the tag/id doesn't match anything, an empty string is returned." "empty string" NOW READS "empty list". {217} The bounding box example showed the query result as ($l, $r, $t, $b), which was incorrect. The result is a list of two diagonal coordinates and NOW READS($x1, $y1, $x2, $y2). {275} In Tk800.023 -variable no longer works. In the Optionmenu example, -variable HAS BEEN CHANGED -textvariable. {277-278} Two lines in the native optiomenu program were incorrect On page 277, third line of the program: my($parent, $varref, $callback, @optionvals) = @_; NOW READS: my($parent, $varref, $command, @optionvals) = @_; And on page 278, 19 program lines down: "-command => [$callback, $_]" NOW READS: "-command => [@$callback, $_]". {313}Eighth paragraph starting with "Line 20 ... in our sample code ... options => [1..5]", "[1..5]" NOW READS "[1..2]" {329} To get the output as shown on the end of the page the code HAS BEEN CHANGED from "foreach (keys %{..." to "foreach (sort keys %{...". {348} Code line after 3rd paragraph: "ldifference [keys %SHAPE], \@{$LLCD{$_}} ]", "\@{...}" NOW READS "$LLCD{$_}". [355] The "make test" example following the second paragraph, "This automatically creates MANIFEST and test.pl for us. Now type this:", the command following this sentence: NOW READS: % make dist {543} 2nd paragraph; the name Grant Hopwell NOW READS Grant Hopwood. [543] 4th paragraph; The noted module (Win32::MemMap) is not available from the previously listed location (http://www.generation.net/~aiminer/Perl) or from CPAN. In addition, the other module required (Tie::Win32MemMap) doesn't appear there or on CPAN. The modules are available either from http://www.Lehigh.EDU/~sol0/ptk/ptk.html or http://jenda.krynicky.cz/perl/. These references HAVE BEEN CHANGED in the text.