Bug in Bruce Webster code (Scribble.app from The NeXT Book)

Started by pl212, October 03, 2012, 05:09:29 am

Previous topic - Next topic


So I was able to get Bruce's demo program, Scribble.app, to work if I substituted "!=" for "<>" in the PaintView.m file -- specifically line 90. The line is:

Quoteif ((mLoc.x <> oldLoc.x) | (mLoc.y <> oldLoc.y)) {

Using those operators results in two parse errors in compilation. Replacing them with "!=" makes the app work just fine. (I may even post the resulting binary, if people are curious?)

I'm guessing this is a slight change to the Objective C syntax between Release 0.8, under which Webster wrote the book, and 0.9, which he did last-minute revisions for?  (I did this programming under 0.9.) But I'm interested if there are any other folks who recognize this change....


Update! I figured it couldn't hurt to ask, and got a very nice note back from Bruce himself.  Looks like this was just an absent-minded use of Pascal operators in an otherwise Objective C context.

So, for those of you who are thinking of building Scribble.app under Release 0.9, just apply my patch above.

Or wait for the new edition of The NeXT Book. :)