On 2008 Oct, 27, at 11:44, Andy Lee wrote:
- (NSManagedObjectContext*)managedObjectContext { NSManagedObjectContext* moc = /* ... create your own MOC ... */; [self setManagedObjectContext:moc]; return moc; }Or alternatively, if your intent is to use the inherited behavior but do some additional stuff to the MOC:- (NSManagedObjectContext*)managedObjectContext { NSManagedObjectContext* moc = [super managedObjectContext]; // ... Do custom stuff to moc ... return moc; }
Thanks, Andy. It looks like I would then be creating a new moc, or doing custom stuff to it, whenever this getter is invoked. No good.
I'm still not sure whether or not it is appropriate to not use super's managedObjectContext instance variable, as proposed at the bottom of my original post.
Jerry _______________________________________________ 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]
