views:

301

answers:

1

I've created a singleton class that loads a plist. I keep getting this error when I try to set a value:

'[ 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?

+3  A: 

Could it be that you are using a non-mutable dictionary instead of NSMutableDictionary?

Georg