Errata

Learning Cocoa with Objective-C

Errata for Learning Cocoa with Objective-C

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
ePub Front Cover

The banner states for the 3rd edition. Should be for the 4th edition

Daniel Holmes  Mar 09, 2014 
Chapter 3; Data; Serialization and Deserialization

Code example to convert an object to a usable NSData says:

NSData* object storedData = [NSKeyedArchiver ...

when it should say:

NSData* storedData = [NSKeyedArchiver ...

Hoylen Sue  May 29, 2014 
Chapter 5; Building an App With Nibs and Constraints

In the step, "1. Add constraints to the table view" the last sentence says, "To pin the position, select the small dotted red spacers for the Top and Left distance positions and leave the default values" when it should say "Top, Left and Right distance positions."
There should also be an additional sentence that says, "Then press the `Add Constraints` button."

Hoylen Sue  May 30, 2014 
Chapter 9; Notifications with NSNotifications

Example of registering for a notification is missing "name:". It says:

[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(applicationEnteredBackground:)
UIApplicationDidEnterBackgroundNotification object:nil];

But should say:

[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(applicationEnteredBackground:)
name:UIApplicationDidEnterBackgroundNotification
object:nil];

Hoylen Sue  May 30, 2014 
Chapter 12; Document-Based Applications on OS X; Saving More Complex Data

The code to check the loaded objects is missing the and operator. It says:

if ([anArray isKindOfClass:[NSArray class]] [anArray count] >= 1) {
// we know it's an array, and has at least 1 object in it
}

but should say:

if ([anArray isKindOfClass:[NSArray class]] && 1 <= [anArray count]) {
// we know it's an array, and has at least 1 object in it
}

Hoylen Sue  May 31, 2014 
PDF, ePub, Mobi

C++ is written as C throughout the preface (all electronic versions).

Under "How to Contact us" the web link is not formatted as such. (all electronic versions).

Anonymous  Nov 03, 2014 
PDF Page 32
1st paragraph

"compiler" is misspelled "coimpiler"

Richard Albury  Feb 23, 2014 
PDF Page 85
Step 3 and 4

The third button is supposed to be a NSPushButton, no? Otherwise the reader ought be be informed to remove the image from the button or a but + sign will be visible on top of the "Publish" string.

David E Larsson  Oct 20, 2015 
PDF Page 86
last paragraph

The text says one should pin the table only to the Left and Top, while you also need to check Right in order for the table to resize according to the window.

David E Larsson  Oct 20, 2015 
PDF Page 87
10th and 11th paragraph, (step 2 and 3)

Text says you should click "Attributes inspector" while in fact you should click "Size inspector" to be able to "[S]et the Relation to Greater Than or Equal."

David E Larsson  Oct 20, 2015 
PDF Page 167
End of code block at top of page

I believe the last line of the code block at the top of the page is missing an ampersand. "error:error];" should be "error:&error];".

Steve Winslow  Oct 25, 2014