If I @synthesize my property (artist) everything works fine
- add observer for keyPath artist.name
- call [myObj setValue:newArtist forKey:@"artist"];
- Success.
if I override the setter method with this:
- (void)setArtist:(GVArtist *)artist
{
GVArtist *oldArtist = _artist;
[self willChangeValueForKey:@"artist"];
_artist = [artist retain];
[self didChangeValueForKey:@"artist"];
[oldArtist release];
}
and do it again, I get:
Cannot update for observer for the key path "artist.name" from , most likely because the value for the key "artist" has changed without an appropriate KVO notification being sent. Check the KVO-compliance of the MyObject class.
It looks fine to me though....?