Handling Cocoa Bindings over a tree of View Controllers
Handling Cocoa Bindings over a tree of View Controllers
- Subject: Handling Cocoa Bindings over a tree of View Controllers
- From: Daryle Walker <email@hidden>
- Date: Tue, 21 Mar 2017 08:26:37 -0400
A design for my third window iteration involves using several NSViewController subclasses in a UI tree. The current (i.e. second) version just has the root NSViewController and a bunch of NSView objects. There is a NSObjectController and a NSArrayController to bind the various view objects to my CoreData-based document data.
Since all the objects are together, I can make a big Bindings network. The new design would spread the components. I need the object controllers to synchronize their editing notifications. I'm wondering how.
I'm half asleep, but I'm thinking of starting with the NSWindowController with a reference to the model and one NSObjectController. That object controller points to the model and it's managed context. For all the NSViewControllers in the tree, they'll use the first object controller as their represented object and reference it for their Bindings needs. Would that work?
Sent from my iPhone
_______________________________________________
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