March 24, 2010 2:16:54 PM PDT (23 weeks ago). Seen 86 times.
Photo Jaime Rae
Member since Jan 13, 2010
Location: Palmer Lake
Posts: 1
I have created a class that has a tableView and it uses a pList to populate the table. I'm using the same coding we used in our class for a similar project. The program builds with no errors, but when I run it in the simulator and click on the tab related to this table view, I get this error:

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<IndianSpringsView 0x564e5b0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key New item - 6.'

I set up my pList like we did in class, starting with an Array, then adding dictionaries for the different topics.

Can anyone tell me why this is crashing?

Jaime
March 24, 2010 3:25:25 PM PDT (23 weeks ago)
Photo Jonathan Lehr
President
AboutObjects
Member since Mar 12, 2009
Location: South Riding
Posts: 22
Yes, one or more of the keys in your dictionaries don't match the names of any of the properties in the objects you're trying to map them into. From the error message, it appears that there's a key named New item - 6. It's impossible in Objective-C for a property name to contain spaces or dashes, so clearly that key will not work. Try changing the key so that it's identical to the name of a property of the object you're trying to map it into.

- Jonathan