On 2008 Oct, 27, at 12:32, Andy Lee wrote:
I don't see that instance variable. I only see a private
_managedObjectContext instance variable in the header, which you
wouldn't have access to anyway. Am I missing something?
Well, there NSPersistentDocument has -managedObjectContext and -
se
On Oct 27, 2008, at 12:40 PM, Andy Lee wrote:
On Oct 27, 2008, at 3:25 PM, Ron Lue-Sang wrote:
On Oct 27, 2008, at 10:49 AM, Jerry Krinock wrote:
So it seems like I need to instead use my own instance variable,
myMOC. Something like this should work:
- (NSManagedObjectContext*)managedObje
On Oct 27, 2008, at 3:25 PM, Ron Lue-Sang wrote:
On Oct 27, 2008, at 10:49 AM, Jerry Krinock wrote:
So it seems like I need to instead use my own instance variable,
myMOC. Something like this should work:
- (NSManagedObjectContext*)managedObjectContext {
if (![self myMOC]) {
NSManage
On Oct 27, 2008, at 3:12 PM, Jerry Krinock wrote:
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 inten
Hi Jerry,
Scroll down…
On Oct 27, 2008, at 10:49 AM, Jerry Krinock wrote:
Documentation for -[NSPersistentDocument managedObjectContext] states:
"If a managed object context for the receiver does not exist, one is
created automatically. You override this method to customize the
creation o
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 som
On Oct 27, 2008, at 1:49 PM, Jerry Krinock wrote:
- (NSManagedObjectContext*)managedObjectContext {
if (![super managedObjectContext]) {
// Create a new MOC...
// Oops, sorry, this branch will never execute.
}
return [self managedObjectContext] ;
}
Won't this lead to inf
Documentation for -[NSPersistentDocument managedObjectContext] states:
"If a managed object context for the receiver does not exist, one is
created automatically. You override this method to customize the
creation of the persistence stack."
Well, the first sentence leaves me in a bit of qu