[comp.sys.mac.hypercard] Shafer: HyperTalk Programming eratta

chuq@plaid.Sun.COM (Chuq Von Rospach) (03/01/88)

This is from Dan Shafer on CompuServe, and is a list of Erata from the first
edition of his HyperTalk programming book.

chuq
----

The following list represents known "bugs" or typos in my book, 
"HyperTalk Programming," first printing.  If you have a copy of the 
first printing, you can make these changes directly to the text.  These 
have all been corrected in the Second Printing, however.

p. 114 - Remove the word "the" from lines 9, 12 and 15 of the 
handler at the top of the page (if optionStatus is down....)

p. 140 - In the two handlers at the top of that page, "repeat for" 
should be "repeat with"

p. 145 - In both handlers, change "repeat for" to "repeat with".  Also, 
there is a space between "down" and "to", not "downTo" but "down 
to".

p.155 - First sentence should be edited to read:  "This command will 
find the "end" in the words blender and weekend as well as in 
ending."

p. 182 - third line from the bottom of the handler.  Change "3 to 67" 
to "3 to 7"

p. 223 - First line of first full paragraph; change 18 other tools to 15 
other tools

p. 243 - Last line of list of instructions in the lab (beginning with 
"choose rectangle tool"), change "click at 50,50" to "click at 151,151"

p. 265 - the last sentence before the last full paragraph on the page 
which starts "You cannot concatenate" should be changed:  "You can 
even concatenate these numbers to make larger numbers (i.e., one 
and three combine to make 13)."

p. 268 - at Step 2 in lab, change "evaluate" to "value".

p. 270 - line below "8 + 45" should be changed to read:  "all by itself 
on a line in a HyperTalk script or in a field makes no sense."  (It does, 
as it turns out, make sense in the Message Box.)

p. 302 - Table 17-1.  "rect[angle]" is read-only for windows, but 
read-write for buttons and fields.

p. 313 - Item numbered 3.  Change "get" to "put"

p. 315 - Delete third line of handler that refers to variable r2.

p. 326 - Delete last sentence in second paragraph under "autoHilite 
Property."  (This property does affect radio buttons and check boxes; 
it causes them to turn "on" and "off" when clicked.)

p. 329 - second line from the bottom of the first paragraph, delete 
"the dialog box".

p. 351 - delete second line of handler at bottom of page (it does no 
harm but it has no effect).

p. 352 - delete second line of handler at top of page (it does no harm 
but it has no effect).

p. 380 - Second line above figure, change "cursor has ID" to "icon has 
ID".  Change caption to read "An icon has a resource number."

p. 408 - delete the funny character at the end of the first line of 
code.

p. 444 - Wrong figure is in place.  No harm but can be confusing.

p. 483 - handler for Card #2, Button #2, Repeat Forever".  Insert "& 
return" after "end repeat" in current line.  It should read:  put return 
& return & "end repeat" & return after holder

p. 487 - last handler on page, change "global effect" in third line from 
bottom to "visual effect."

p. 491 - Two fixes.  In first handler on page, put space after "to" and 
before "15" in the fourth line.  In second full handler, change "scroll" 
in third line to "wipe."

p. 492 - First handler needs new first line, "global holder".

Chuq Von Rospach			chuq@sun.COM		Delphi: CHUQ

     There is no reason for any individual to have a computer in their home.
                               Ken Olson, President, Digital Equipment, 1977

king@entropy.ms.washington.edu (Jim King) (03/02/88)

In article <43633@sun.uucp>, chuq@plaid.Sun.COM (Chuq Von Rospach) writes:
> This is from Dan Shafer on CompuServe, and is a list of Erata from the first
> edition of his HyperTalk programming book.
> 
**followed by list of errata**

Here are a couple of others from the Shafer book:

(1) a typo in the handler on page 118 (i should be x) 
> 
> p.155 - First sentence should be edited to read:  "This command will 
> find the "end" in the words blender and weekend as well as in 
> ending."
> 
(2) another on page 155, the command find "5" will not find all the
numbers with the digit 5 but will find only those which *begin* with 5
(or at least that happened when I tried it) whereas find chars "5"
will find them all.  Amusingly enough, Shafer makes a point of
explaining this quite clearly on the previous page.

This sense that Shafer hasn't read his own book is heightened by the
errors on 140 and 145 (using repeat for instead of repeat with) which
occur right in the middle of an explanation of the differences in
these two kinds of repeat.

I am impressed in a certain sense by Shafer's ability to whip out a
book of this size so fast and I have found some useful information in
it.  At the same time, while some errors are inevitable, it seems that
the scripts in final form could have been extracted (automatically,
with a button!) and checked to see that they worked before shipping
the book out to the unsuspecting multitudes.  While checking the text
would have been a more daunting job, it does seem that Shafer relied a
little too much on what he thought he knew happened instead of trying
it out.

As for the Goodman book, it seems more reliable to me so far, but I
did come across a curious passage on page 555.  He is explaining that
the function the Result contains a non-empty string if a Go or Find
fails.  First (no big deal) the message actually returned by FInd in
the Result is not exactly what he says, but more curiously, the
example at the bottom of the page, which involves typing "the result"
(no quotes) in the message box after some failed Go's and Find's
doesn't show anything although the implication is that there should be
an error message.  On the other hand, when I experimented with this,
it was possible to put the Result in Message inside a script.

HYPERTALK QUESTION:  Why does the Result only seem accessible in a handler and
not from the message box?  Is the Result local in some sense, or is it
cleared by using the message box?

Back to the books:

My guess is that it will be some time before we see a really
insightful book about Hypercard that does not come from someone with
an insider's relationship with the development team (when is Carol
Kaehler's book on scripting due out?) because the author will first
have to do enough Hypertalk programming to get some real insights and
then still will have to write the book.  While the insiders' books are
not quite fair to other potential authors' chances, at least these
books give "the rest of us" much better documentation than the Mac had
in the pre-"phonebook edition" Inside Mac days.

Jim King

uucpnet address:   uw-beaver!uw-entropy!king
Internet (arpanet) address:    king@entropy.ms.washington.edu
Bitnet address: 
king%entropy.ms.washington.edu@beaver.cs.washington.edu

James King
Dept of Math
Univ of Washington
Seattle, WA 98195

dtw@F.GP.CS.CMU.EDU (Duane Williams) (03/02/88)

One thing people need to understand about publishing a book: the author
isn't always responsible for errors that get into the published edition.
Editors sometimes introduce errors also, and don't always return an edited
manuscript to the author for review before publication.  I was surprised
that the posted list of errata in Shafer's book was so short.

Duane Williams
dtw@cs.cmu.edu