Splitting controller logic
Splitting controller logic
- Subject: Splitting controller logic
- From: Chase Meadors <email@hidden>
- Date: Tue, 29 Sep 2009 17:15:42 -0500
Hi All,
I'm having some conceptual trouble concerning using multiple windows
with multiple controllers in a project. Where exactly is the line as
to what a window controller subclass should manage, and what the App
controller should manage?
Say I have a window with a fair amount of controls and setup required,
so I create a window controller that manages it. I implement
awakeFromNib on it to do the setup, and it implements any IBActions
needed for controls in that particular window.
My app controller contains properties that are needed by every window
in the app for modification or bindings. It seems to me, to avoid
mixing windows with other controllers than their own, that I should
declare an IBOutlet id mainAppController in each of the window
controllers, and modify/bind to properties in the app controller by
binding to myController.mainAppController.aProperty.
I'm just trying to get a conceptual check as to whether this is the
correct approach. Any feedback appreciated!
_______________________________________________
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