window controllers and managed object contexts
window controllers and managed object contexts
- Subject: window controllers and managed object contexts
- From: Daniel Child <email@hidden>
- Date: Fri, 26 Sep 2008 14:33:53 -0400
To avoid cluttering up my main AppController (which had five windows),
I've started placing the individual windows into separate xib files.
Pre-Core Data (for a regular cocoa app), I would simply set up a
window controller, establish a reference to it in the main controller
(initWithWindowNibNamed), and load the window when needed.
I tried this, but with Core Data, I'm getting a message that I need a
managed object context (moc). I know how to get the moc, but I can't
figure out who is calling for the moc in the first place. Something
inside of the underneath NSWindowController code, I suspect. The
window controller's initialization goes fine, as does awakeFromNib.
Also, the File's Owner is set to the window controller class. So which
method (one called by Cocoa, not me) needs to be overwritten so I can
pass the moc to it?
Or is there something else entirely going on?
Thanks.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden