View Full Version : KVC simple path vs compound path

Apr 16, 2009, 03:23 AM
According to Apple's article about KVC http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/BasicPrinciples.html paths for valueForKey can be compound. I mean consist from several property names separated by dot.
So if I want to get value of property of an object inside of one of it's accessors, than I can use [self.someproperty valueForKey:@"somevalue"]; or [self valueForKey:@"someproperty.somevalue"];
But second does not work! It says "this class is not key value coding-compliant for the key". So what is the problem with compound key path?