'valueForUndefinedKey' method in a MO is triggered when the 'key' accessor already exists; why?
'valueForUndefinedKey' method in a MO is triggered when the 'key' accessor already exists; why?
- Subject: 'valueForUndefinedKey' method in a MO is triggered when the 'key' accessor already exists; why?
- From: "Frederick C. Lee" <email@hidden>
- Date: Wed, 5 Apr 2006 17:23:40 -0700
I have a MO that is a grandchild of NSManagedObject:
{MapManagedObject : EntityManagedObject : NSManagedObject}
Here's one of several hassles I can't figure out.
I have an 'image' accessor, yet the 'valueforUndefinedKey' is
triggered.
Why? or, what could have caused this?
Ric.
MapManagedObject.m:
...
- (NSImage *)image {
[self willAccessValueForKey:@"image"];
NSImage *mapImage = [self primitiveValueForKey:@"image"];
[self didAccessValueForKey:@"image"];
return mapImage;
}
- (id)valueForUndefinedKey:(NSString *)key {
return self; <-- (gdb) break here.
}
...
=========================
(gdb) po key
image
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden