Creating iOS 5 Apps Discussion > Chapter 4 - Editing the History View
Sorry I didn't reply earlier. I've been wrapped up in a number of projects.
I downloaded and tested the code for Chapter 4. It seems to work fine. Looking at the error, it looks like you (or some part of your code) is trying to access a "Weight History" property in your WeightHistory class. You probably just mistyped the key name. You could do a search for "Weight History" and see if you can find it. It probably needs to be changed to weightHistory (or something similar). My guess is it will be this code here:
+ (NSSet *)keyPathsForValuesAffectingWeights {
return [NSSet setWithObjects:@"weightHistory", nil];
}
These errors also often crop up because of Interface Builder. For example, if you make a connection, then delete it. Sometimes it will linger in IB, and create this sort of error. However, I couldn't find any references to the Weight History in the storyboard, so I doubt that's the problem.
Finally, you can always set an exception breakpoint to help you figure out exactly where the error occurred. To do this, open the breakpoint navigator and click on the plus button at the bottom. Select Add Exception Breakpoint....
I hope that helps,
-Rich-

Hi,
I have one problem on "Editing the History View" part of chater 4.
I have implemented code like the document and successfully builded but I have a runtime error.
After I added new entry and then when I remove a weight entry from History View, I have this error.
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<WeightHistory 0x6a636d0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key Weight History.'
I traced the code and I found that the code stops on first line of removeWeightAtIndex Method on WeightHistory.m
I tried your code and it works fine on my mac.
I tried alot to find out the error but there seems no way to fix it with my ability.
Please check on the problem and let me know soon.
http://dl.dropbox.com/u/49996883/Health%20Beat.zip
Thanks.