FAQ: *** Terminating app due to uncaught exception 'NSUnknownKeyException', reas
FAQ: *** Terminating app due to uncaughtexception 'NSUnknownKeyException', reason: '[setValue:forUndefinedKey:]: this class is not key valuecoding-compliant for the key itemName.' (permalink)答案:If you're using NIB files / Interface Builder, what this error message REALLY means is:
"Your NIB file has a GUI element that's connected (via the Outletsscreen) to an outlet in one of your source files that doesn't exist"
i.e. it usually happens when you change the name of an IBOutletvariable in your source file, and forget to change your NIB file toreflect the change.
(sadly, Interface Builder isn't good enough to automatically renamethe connection, as it is supposed to do - you MUST do it manually)