Search
Rich's Mad Rants
Powered by Squarespace

Creating iOS 5 Apps Discussion > Page 297 - clarification needed, where to put contentsForType:error:

On page 297 you direct the reader to override UIDocument's contentsForType:error: and LoadFromContents:ofType: methods. However, you do not state which file this is to be done. Since the last coding was done in WeightEntry.m, the reader may presume incorrectly to place the code in this file. Referencing the downloaded source code for the chapter, the correct location for this code is in WeightHistory.m (which can also be gleaned from the fact that we're passing self.weightHistory to achiveDataWithRootObject:, but not before a good bit 'o head-scratching and digging around).

December 28, 2011 | Unregistered CommenterScott

Whenever you're overriding a classes methods, the new methods have to go into the subclass. However, I can see how that would be confusing, since I didn't explicitly mention switching files--which is something I usually do. Sorry about that.

December 29, 2011 | Registered CommenterRichard Warren