Re: Bindings, am I doing right by MVC?
Re: Bindings, am I doing right by MVC?
- Subject: Re: Bindings, am I doing right by MVC?
- From: Keary Suska <email@hidden>
- Date: Fri, 23 Oct 2009 16:08:25 -0600
On Oct 23, 2009, at 11:52 AM, Paul Bruneau wrote:
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.
Using an intermediate controller may be a stylistic issue, but your
approach above is not "wrong". If the bound fields are editable, I
recommend using an intermediate NSObjectController because you will
get some useful behavior "for free", such as -commitEditing and the
like.
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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