singleton managed object / obtaining mo context

2008-09-09 Thread Daniel Child
Hi All, I am trying to implement a singleton class which is a subclass of NSManagedObject, but it is not behaving as expected. The librarian singleton is supposed to keep a list of the data sources, which are added periodically. I'm trying to cache the Librarian as an instance variable

Re: singleton managed object / obtaining mo context SOLVED

2008-09-09 Thread Daniel Child
As a followup to my own question, it seems that the context is not created until awakeFromNib. If I wait until awakeFromNib, I can access it via: [[NSApp delegate] managedObjectContext]; OR [[[NSApplication sharedApplication] delegate] managedObjectContext]; and those return the same value.