Skip navigation.
 
mlRe: NSTableView, NSArrayController, NSManagedObjectContext
FROM : mmalc crawford
DATE : Tue Jan 01 20:30:49 2008

On Jan 1, 2008, at 11:22 AM, Ture Pålsson wrote:

> Now I suddenly need do call methods in an NSController, meaning that 
> I need
> to have a reference (probably in the form of an IBOutlet) to this 
> controller somewhere
>

Yes, that's perfectly reasonable.

Or if for some reason you really want to avoid that (and to reiterate, 
there's no need to do so, it's standard Cocoa architecture), you could 
create an NSArrayController subclass that registers for save 
notifications from the other managed object context and updates itself 
in response (depending on your application architecture, it may be 
that you'll need an outlet from the array controller to, say, the 
document object to get the other MOC).

mmalc