Cocoa in a Nutshell by Michael Beam, James Duncan Davidson The unconfirmed error reports are from readers. They have not yet been approved or disproved by the author or editor and represent solely the opinion of the reader. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification This page was updated March 7, 2008. UNCONFIRMED errors and comments from readers: (11) 5th line from bottom; Song song = [song alloc]; should be the following instead Song song = [Song alloc]; (12) top of page; Song song = [[song alloc] init]; should be Song song = [[Song alloc] init]; [14] Ex. 1.9; The code frag shows "title = [newTitle copy]"; shouldn't that be "title = [aTitle copy]"? At least, there ought to be some declaration for newTitle, no? {19} 11th paragraph; There is a line of code that looks like this: char cStr = [str UTFString]; when it should be: char *cStr = [str UTF8String]; The pointer was forgotten, and the method is UTF8String, not UTFString. (24) middle paragraph; NString should be NSString. {26} 2nd paragraph; In the beginning of the example some NSNumber's are instantiated with names cN,lN,usN. Later the variable names are backwards and loose the capitalization on the N. The line BOOL b = [nc isEqualToNumber:nl]; should be BOOL b = [cN isEqualToNumber:lN]; Likewise the line NSComparisonResult r = [nc compare:nus]; should be NSComparisonResult r = [cN compare:usN]; also r = [nus compare:ns]; should be r = [usN compare:cN]; //not sure if cN is what you want here, my guess is yes (29) Example 2-11, 8th 'paragraph'; set1 is created as (a, b, c, d) set3 is created as (c, d, e, f) Fourth line of code is b = [set3 intersectsSet:set1]; // Returns NO However, these two sets do intersect, and this code returns YES (tested on Leopard) [30] //Create a dictionary with many objects and keys; This is wrong: d = [NSDictionary dictionaryWithObjects:@"a", @"b", nil forKeys:@"A", @"B", nil]; Should be: d = [NSDictionary dictionaryWithObjects: [NSArray arrayWithObjects: @"a", @"b", nil] forKeys:[NSArray arrayWithObjects:@"A", @"B", nil]]; [89] Figure 4-6; the description in brackets after both of the two upper dashed lines appears to be incorrect... shouldthese not read (respectively): (50, 25) (50, 25, 75) The bottow figures in brackets might also need correcting to: (50, 25), phase = 25 {116} Ex. 6-2; The third example showing how to initialize with scheme, host and path, has an extra space in the string for the scheme. It should read (in part): initWithScheme:@"FTP" {145} 2nd line of code in example 8.6; Typo: "NSAtrributedString" should be "NSAttributedString". Also, extra word "strin". {115} In example 6.1, under the comment "Other ways to create a host object"; The examples using hostWithAddress: and hostWithName: need to be switched, i.e. it should read hostWithName:@"www.oreilly.com" [325] Line 48; -(void)curveToPoint:(NSPoint)endPoint; should be - (void)curveToPoint:(NSPoint)endPoint controlPoint1:(NSPoint)controlPoint1 controlPoint2:(NSPoint)controlPoint2;