Reputation: 44352
I've created a singleton class that loads a plist. I keep getting this error when I try to set a value:
[<MyPlist 0x1917bc0> setValue:forUndefinedKey:]:
this class is not key value coding-compliant for the key test.'
I have one key in the plist file. The key is named "test" and has no value associated with it. I set the value like this:
[[PlistManager sharedManager].plist setValue:@"the title value" forKey:@"test"];
I look at the set plist dictionary and see this from within PlistManager:
po self.plistDictionary
{
test = "";
}
I get the error just as I'm leaving PlistManager in the debugger. PlistManager is of type NSObject. So no xibs. Any ideas on what I need to do?
Upvotes: 3
Views: 3238
Reputation: 126175
Could it be that you are using a non-mutable dictionary instead of NSMutableDictionary?
Upvotes: 16