Bindings, am I doing right by MVC?
Bindings, am I doing right by MVC?
- Subject: Bindings, am I doing right by MVC?
- From: Paul Bruneau <email@hidden>
- Date: Fri, 23 Oct 2009 13:52:24 -0400
I'm trying to do things correctly in my new app that I am writing, so
I wanted to ask this question because I'm not sure if I am.
I have a window for a "door" object in my document (NSDocument based
app). It's a good thing I don't work for a window company or things
would be really confusing.
In the window I have a lot of UI elements.
First, I feel I'm doing things correctly with my table bindings. I
have array controllers and I bind like:
Bind to: Cutouts (the array controller)
Controller key: Arranged Objects
Model Key Path: cutoutWidth (an ivar of the object in the array)
(this information is made annoying to get because the IB Inspector
window disappears when I click in Mail. Not helpful!!!)
But I wonder about my edit fields. They are bound like:
Bind to: File's owner (a NSWindowController subclass)
Controller Key: <blank>
Model Key Path: door.backset (door is an ivar of the window
controller--it's the door that the window controller is for. backset
is just an ivar of the door object)
Does that look ok, or am I skipping another controller that should be
in there? Skipping controllers is probably one of my most serious bad
habits that I'm trying to break.
Thanks for any insight,
Paul
_______________________________________________
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