Challenge 2 errata?


I haven’t tried this project yet, but there seems to be a number of errors in the “To get you started…” listing.

  1. “In RMDocument.xib you will set the identifier…” is not done in the “Attributes Inspector”, but in the “Identity Inspector”. Do I need to qualify the identity i.e. “Person.personName” or is just “personName” Ok?

  2. @interface RMDocument : NSDocument - shouldn’t that also include as that is a protocol that the class needs to implement?

    • (id)init method - shouldn’t this read “employees = [[NSMutableArray alloc] init];” as opposed to “employees = [NSMutableArray array];” ?

Of course I may just need to go and lie down in a darkened room for a while!

Any help would be appreciated

Kind Regards



My code (for Challenge 2) was throwing an exception, and it took me a looong time (that is a very long time) to figure out the errata #1 you mention above. The misleading direction in the text was difficult to figure out (with the experience level of someone new to Cocoa and only having made it through chapter 8 in the book). Just venting a bit, I guess. :slight_smile:

On a related note, and more of a worthwhile posting, could Challenge 2 have been written without making use of the “identifier” feature of a tableview? In other words, could I have kept two arrays (or a two-dimensional array) and then tested which column number a value was needed for? (instead of referencing columns by their identifiers which were set in IB).