We try to keep our books accurate, but sometimes mistakes creep
in. This page lists the errors submitted by our astute readers.
If you've found a new error, please
submit it.
The latest version of the book is P1.0a,
released about 3 years ago.
If you've bought a PDF of the book and would like to upgrade
it to this version (for free), visit your
home page.
| PDF |
Paper |
Description |
Found in |
Fixed in |
| 16 |
|
#44001: Typo in paragraph 2: "You’ll be tempted to hold on the way you used to do things." should be "You’ll be tempted to hold on to the way you used to do things."--Ken Anderson #44001: Typo in paragraph 2: "You’ll be tempted to hold on the way you used to do things." should be "You’ll be tempted to hold on to the way you used ...more...
|
P1.0a
07-Jul-10
|
|
| 17 |
|
#43041: "They are unfamiliar, so your first instincts won’t always be right. but in no time you’ll be typing in what you assume the method"
Shouldn't the fullstop after right be a comma?--Peter W A Wood #43041: "They are unfamiliar, so your first instincts won’t always be right. but in no time you’ll be typing in what you assume the method"
Shouldn ...more...
|
P1.0
01-May-10
|
|
| 21 |
|
#42718: In "Starting Fresh", the sentence "These problems manifest themselves in different ways but are often surface when dealing with nib files." should be "...but often surface...".--Paul Matchen #42718: In "Starting Fresh", the sentence "These problems manifest themselves in different ways but are often surface when dealing with nib files." sho ...more...
|
B1.15
08-Apr-10
|
|
| 40 |
|
#46363: The book states: "In the top-left corner of your Xcode window, you will see the warning that the application is
TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION" but i cant see this at any place.
In the bottom-left of Xcode windows I see:
GDB: Program received signal: “SIGABRT”.--Reinaldo de Souza Junior #46363: The book states: "In the top-left corner of your Xcode window, you will see the warning that the application is
TERMINATING_DUE_TO_UNCAUGHT_E ...more...
|
P1.0a
05-Feb-11
|
|
| 41 |
|
#49350: Not so much an error, but the later versions of Xcode (mine is 4.2) don't have Add > Existing Frameworks. This describes this is the new gui steps for adding the webkit framework:
stackoverflow.com/questions/3352664/how-to-add-existing-frameworks-in-xcode-4
Of course, many other things have changed in XCode 4, but Just listing this in the errata would have saved me a bunch of time poking around trying to match things up (most other things up until there had been easy enough to guess around).
Great book so far, thanks! Hoping there's an update for XCode 4.x in planning...--Admin A Gamz LLC #49350: Not so much an error, but the later versions of Xcode (mine is 4.2) don't have Add > Existing Frameworks. This describes this is the new gui ...more...
|
P1.0a
17-May-12
|
|
| 53 |
|
#43012: The text reads:
---
The return type of goBack is BOOL. You can see by the Discussion section that in Objective-C the two boolean values are YES and NO and not true and false.
---
In fact, this is contained in the Return Value section in the figure.--Ben Bleything #43012: The text reads:
---
The return type of goBack is BOOL. You can see by the Discussion section that in Objective-C the two boolean values ar ...more...
|
P1.0
28-Apr-10
|
|
| 54 |
|
#43013: The footnote states that the return type of goBack: is IBAction, but the documentation seems to clearly indicate that it's void.
This could be a quirk of Apple's documentation; searching for goBack: in the documentation browser shows that PDFView's goBack: method does return IBAction.--Ben Bleything #43013: The footnote states that the return type of goBack: is IBAction, but the documentation seems to clearly indicate that it's void.
This could ...more...
|
P1.0
28-Apr-10
|
|
|
58 |
#44387: Last paragraph, 2nd sentence starts "I'll add code some of" should be "I'll add some of".
--Pete Siemsen
|
P1.0
02-Aug-10
|
|
|
69 |
#45613: This line in the sample code under section 4.10 'Logging Objects' produces 2 errors '_LINE_', and '_FILE_' not defined:
NSLog(@"This occurred in %@ at line %d in file %s.", NSStringFromSelector(_cmd),_LINE_, _FILE_);--Bob Miller #45613: This line in the sample code under section 4.10 'Logging Objects' produces 2 errors '_LINE_', and '_FILE_' not defined:
NSLog(@"This occurre ...more...
|
P1.0
15-Nov-10
|
|
| 87 |
|
#42777: "The return type ofinitWithName: is id." There should be a space after "of".--Paul Matchen
|
B1.15
13-Apr-10
|
|
| 88 |
|
#42778: In footnote 2: "We’ll look at theIBAction return type in Chapter 7" there should be a space before "IBAction".--Paul Matchen
|
B1.15
13-Apr-10
|
|
| 90 |
|
#44626: In section 5.3, the setter method initially reads as "-(void) setName:(NSString *) name;" while it should be "-(void) setName:(NSString *)newName;". This mistakes is corrected on the very next page when the implementation is shown. #44626: In section 5.3, the setter method initially reads as "-(void) setName:(NSString *) name;" while it should be "-(void) setName:(NSString *)newN ...more...
|
P1.0a
15-Aug-10
|
|
| 101 |
|
#43046: The code in Hello World 16:
-(void)applicationDidFinishLaunching:(NSNotification *)aNotification {
Greeter *greeter = [self greeterFor:@"Maggie"];
NSLog(@"Greeter: %@", greeter);
NSTextField * label = [self labelWithText:[greeter greeting]];
[self setUpperCaseName:greeter];
[[self.window contentView] addSubview:label];
}
might lead one to suppose the result should be in upper case - penultimate line. It obviously doesn't but it is unnecessarily confusing for someone learning Cocoa. Suggest a footnote to explain pr fix the code.--Vic Strachan #43046: The code in Hello World 16:
-(void)applicationDidFinishLaunching:(NSNotification *)aNotification {
Greeter *greeter = [self greeterFor:@ ...more...
|
P1.0
03-May-10
|
|
| 109 |
|
#46256: Omission: A common error is to leave the dropdown on the topleft with "Device" selected. Any unregistered developers would then see an error. It would be helpful to add in the suggestion to select "Simulator" before the beginning of "Click Build & Run" on the 5th paragraph.--Donovan #46256: Omission: A common error is to leave the dropdown on the topleft with "Device" selected. Any unregistered developers would then see an error. ...more...
|
P1.0a
17-Jan-11
|
|
| 112 |
|
#43047: Text in penultimate sentence before section 7 -
"That is enough information for us to find the leak, although if you double-click the line reporting the leaked Greeter object, you will be taken to the offending lines in the source code." Double clicking doesn't do anything. You much click the arrow in the address column and then double click the result.--Vic Strachan #43047: Text in penultimate sentence before section 7 -
"That is enough information for us to find the leak, although if you double-click the line re ...more...
|
P1.0
03-May-10
|
|
| 114 |
|
#43050: First sentence on page:
"Choose the menu item Build > Build & Debug. You should see a boilerplate message in your Console window followed by something like this:".
I cannot get this to work whatever I do including cleaning target and using the downloaded code.--Vic Strachan #43050: First sentence on page:
"Choose the menu item Build > Build & Debug. You should see a boilerplate message in your Console window followed ...more...
|
P1.0
03-May-10
|
|
| 114 |
|
#43054: If I use the downloaded code for Flashlight4 I get the following response minus the last line:
"Greeter name: Maggie created: 2009-09-18 14:24:43 -0400
objc[11179]: FREED(id): message respondsToSelector: sent to freed object=0x3b06760
Program received signal: ‘‘EXC_BAD_INSTRUCTION''."
There does not appear to be a reference to Flashlight 4 in the text.--Vic Strachan #43054: If I use the downloaded code for Flashlight4 I get the following response minus the last line:
"Greeter name: Maggie created: 2009-09-18 14 ...more...
|
P1.0
03-May-10
|
|
| 126 |
|
#43157: Second paragraph from the bottom. There is a 'space' missing before IBOutlet.--Tony Daly
|
P1.0
09-May-10
|
|
| 168 |
|
#42792: For the following code:
- (void)webView:(WebView *)sender didReceiveTitle:(NSString *)title forFrame:(WebFrame *)frame {
[[sender window] setTitle:title];
}
I've found that the delegate method is called for iframes within a page as well, changing the window title to it's title.
You might want to change it to the following and mention the issue:
-(void)webView:(WebView *)sender didReceiveTitle:(NSString *)title forFrame:(WebFrame *)frame {
if(frame == [sender mainFrame]) [[sender window] setTitle:title];
}
--Michael Gregoire #42792: For the following code:
- (void)webView:(WebView *)sender didReceiveTitle:(NSString *)title forFrame:(WebFrame *)frame {
[[sender ...more...
|
B1.15
15-Apr-10
|
|
| 168 |
|
#43088: Doesn't the line of code:
"[sender window] setTitle:title]"
break the author's own injunction to use dot notation?
Should it not be:
"[sender.window setTitle:title]?--Vic Strachan #43088: Doesn't the line of code:
"[sender window] setTitle:title]"
break the author's own injunction to use dot notation?
Should it not be:
"[sen ...more...
|
P1.0
04-May-10
|
|
|
171 |
#47230: The sentence in footnote 5 has an agreement problem: "Other methods we often use ... is ..." should be "Other methods we often use ... are ..."--Ramsey Dow
|
P1.0
28-Jun-11
|
|
| 178 |
|
#43168: The paragraph preceding Section 10.3. contains the sentence:
"If you click in another area of the screen, the keyboard is dismissed, but the next time you select the text field, the URL will be cleared, and you need to start all over again."
I have followed the instructions (I think) and when I select the text field the URL is not cleared.--Vic Strachan #43168: The paragraph preceding Section 10.3. contains the sentence:
"If you click in another area of the screen, the keyboard is dismissed, but the ...more...
|
P1.0
10-May-10
|
|
|
195 |
#46245: In section 12.3, "The delegate was a WindowHelper object that extended NSWindow" should be replaced by "The delegate was a WindowHelper object that extended NSObject". #46245: In section 12.3, "The delegate was a WindowHelper object that extended NSWindow" should be replaced by "The delegate was a WindowHelper object ...more...
|
P1.0
15-Jan-11
|
|
| 205 |
|
#46418: The 3rd footnote states an Objective-C protocol is similar to an Interface in Java.
If you implement a Java Interface, you have to implement all its methods.
A Java Adapter is a dummy class that implements an Interface, containing empty bodies. Hence you can inherit from an Adapter, only overriding those methods you need.
One example is the Java Interface is WindowListener and its Adapter is WindowAdapter.--Stijn #46418: The 3rd footnote states an Objective-C protocol is similar to an Interface in Java.
If you implement a Java Interface, you have to implement ...more...
|
P1.0
18-Feb-11
|
|
| 211 |
|
#43276: The code for this section contains an instance of ActivityController ac. This is used as an outlet from the AppDelegate but it serves no apparent purpose and is very confusing. The code runs perfectly well when all traces are removed. If it does have a purpose please explain it, if it doesn't please get rid of it. When one is trying to learn such inconsistencies cost a lot of time and effort.--Vic Strachan #43276: The code for this section contains an instance of ActivityController ac. This is used as an outlet from the AppDelegate but it serves no appa ...more...
|
P1.0a
17-May-10
|
|
| 212 |
202 |
#46403: Solution of the problem:
212 202 #46183: Error or not error? …
Solution: Because OS 10.5.8 does not support Xcode 3.2.5, I use running Xcode on a server (mini Mac OS 10.6.6. Intel Core 2 duo) remotely administered on a PowerPC G5 (OS 10.5.8). When opening iCal or any other program on that local administrator computer which does not host the running Xcode the problem shows up. But when iCal or any other program is opened on the server (where Xcode and the code is running) then the code works correct. - Sorry for my misleading question: Error or not error? …--Gerhard Fassnacht #46403: Solution of the problem:
212 202 #46183: Error or not error? …
Solution: Because OS 10.5.8 does not support Xcode 3.2.5, I use running Xc ...more...
|
P1.0a
14-Feb-11
|
|
| 212 |
202 |
#46183: Error or not error? - You are writing:
"Click Build & Run, and your application should run exactly as before.
We’re now receiving notifications when applications launch or terminate …"
My code is exactly the same as your code I have downloaded. I have never received a notification when application terminates. Principally, how could 'Terminated' be displayed after the application has terminated? Should we not apply something like 'applicationWillTerminate' or 'applicationShouldTerminate' to get an appropiate message?
Gerhard
--Gerhard Fassnacht #46183: Error or not error? - You are writing:
"Click Build & Run, and your application should run exactly as before.
We’re now receiving notifica ...more...
|
P1.0
05-Jan-11
|
|
| 228 |
|
#43307: The download HelloApplication18 contains currentApp in HelloApplicationAppDelegate, it appears to serve no purpose and is confusing. If it does serve a purpose please explain it. If it doesn't serve a purpose please so indicate in a footnote. Poor beginners such as myself can waste a lot of time chasing the function of such items--Vic Strachan #43307: The download HelloApplication18 contains currentApp in HelloApplicationAppDelegate, it appears to serve no purpose and is confusing. If it do ...more...
|
P1.0a
18-May-10
|
|
|
232 |
#46200: After the following of chapter 14 - Multiple Nibs, i've discovered that it is possible to resize the window when it runs. When you start resizing the NSImageWell and NSTextfield start flying all over the window and out of it.
I compared it with the sample code (Multiple Nibs - hello applicaton21) and this too has the same "strange" behaviour.
The setting of the setContentSize does work well initially, but i think somehow the view should lock.
--Martijn Onstwedder #46200: After the following of chapter 14 - Multiple Nibs, i've discovered that it is possible to resize the window when it runs. When you start resiz ...more...
|
P1.0
07-Jan-11
|
|
| 235 |
|
#43306: Either the last word on the page should be NSTextField not NSTextView or the HelloApplication18 download is in error.--Vic Strachan
|
P1.0a
18-May-10
|
|
| 252 |
|
#42717: You do not see this "default" look until you add the following line to IconViewController.m:
((IconView *)self.view).appName = app.localizedName;
This isn't mentioned (shown) until the bottom of page 253--Ken #42717: You do not see this "default" look until you add the following line to IconViewController.m:
((IconView *)self.view).appName = app.localize ...more...
|
B1.15
08-Apr-10
|
|
|
282 |
#44730: You suggest typing in the short plist file (or constructing it programmatically). It is much easier to use the Property List Editor which comes in the Utilities folder. This would also give new users a taste of using the Property List Editor.--Cary Rader #44730: You suggest typing in the short plist file (or constructing it programmatically). It is much easier to use the Property List Editor which co ...more...
|
P1.0
27-Aug-10
|
|
|
283 |
#48770: In the loadView method, I found I needed to replace
ofType:nil
with
ofType @"plist"
(Xcode 4, OS Lion)--Alex
|
P1.0
19-Feb-12
|
|
|
283 |
#48771: In the loadView method, I found I needed to replace
ofType:nil
with
ofType: @"plist"
(Xcode 4, OS Lion)--Alex
|
P1.0
19-Feb-12
|
|
|
316 |
#47966: "I've chosen to update the display with the new value that I pull off the "change" dictionary.
Line 5 reads:
[self updateDisplay:[object valueForKeyPath:keyPath]];
In fact, the author is pulling the value from the object ( in this case, "UpOrDown" )
this call seems to fulfill the intent of the author.
[self updateDisplay:[change valueForKeyPath:@"new"]];--Michael de Haan #47966: "I've chosen to update the display with the new value that I pull off the "change" dictionary.
Line 5 reads:
[self updateDisplay:[object ...more...
|
P1.0a
19-Nov-11
|
|
|
321 |
#44852: Here is another way to solve the problem of several observations: use the context variable. In Display.m, awakeFromNib, use [counter addObserver: self forKeyPath @"countOne" .... context @selector(updateDisplayOne:)] (and similarly for countTwo and updateDisplayTwo: ). Then observeValueForKeyPath: ...
reduces to one line:
{ [self performSelector: context withObject: [object valueForKeyPath: keyPath]]; }--Cary Rader #44852: Here is another way to solve the problem of several observations: use the context variable. In Display.m, awakeFromNib, use [counter addObserv ...more...
|
P1.0
03-Sep-10
|
|