On 2011 Jul 24, at 01:46, Roland King wrote:
> does core data implement setFoo: by *always* calling the primitive method,
> setPrimativeFoo:
Well, it is documented that Core Data's implementation of setFoo: is equivalent
to
- (void)setFoo:(id)newValue {
[self willChangeValueForKey:@"foo"] ;
[self setPrimitiveFoo:newValue] ;
[self didChangeValueForKey:@"foo"] ;
}
There are no branching statements in there.
> or do I need to add the code in both setFoo: and setPrimitiveFoo:?
It's better than either case you've proffered. I've always put my custom
behaviors in setFoo:. The only time I've ever messed with setPrimitiveFoo: is
when debugging.
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]