Two Array Controllers, loading from CoreData, without a contentArray...
Two Array Controllers, loading from CoreData, without a contentArray...
- Subject: Two Array Controllers, loading from CoreData, without a contentArray...
- From: Jim Thomason <email@hidden>
- Date: Tue, 22 Sep 2015 08:40:53 -0500
First, to be clear, I'm not actually trying to do this. I'm just curious
how it could be done. I cooked it up while working on other things.
The question is simple - is there a reasonable way to create two
NSArrayControllers, have them bound to an entity through CoreData, and keep
them in sync?
So there's ControllerA, which populates TableA; and ControllerB, which
populates TableB. Neither of them have an explicit bound contentArray, they
just load up all of their associated entities straight from the
managedObjectContext.
I'd like to be able to add an object into ControllerA, and have it
automatically show up in ControllerB. I haven't figured out a way to do it.
If they were both bound to the same contentArray, it's no problem - the
content automatically shows up. But if it's loaded via the fetch request,
then some other mechanism needs to come into play.
Subclassing them both and having A post a notification so that B re-fetches
its content is the best solution I've got, but I figured I'd ask around and
see if anybody else had a more clever approach.
-Jim...
_______________________________________________
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