Error(s) in chapter


#1

Pg. 306:

[code]NSNumber *n = [NSNumber numberWithDouble:(lowerBound + upperBound)/2.0];

NSLog(@“moving to order %@”, newOrderValue);
[p setOrderingValue:n];
[/code]

which I believe should be:

NSNumber *n = [NSNumber numberWithDouble:(lowerBound + upperBound)/2.0];
    
NSLog(@"moving to order %@", n);
[p setOrderingValue:n];

Also, I noticed that fetchPossessionsIfNecessary is no longer declared in PossessionStore.h, but appears in PossessionStore.m. Is there a reason we’re not declaring it in the header file - I noticed it isn’t declared in your sample files, either.


#2

Yes, it should be n. Sorry about that.

Not sure how we left it out of the header file, but it’s okay if it isn’t there: no other object will tell the PossessionStore to fetchPossessionsIfNecessary. It is a “private” method, so to speak. In the Blocks and Categories chapter, you’ll learn a more appropriate way of doing this.


#3

It’s correct in the Safari Books Online version.