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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to