• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bindings, am I doing right by MVC?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Bindings, am I doing right by MVC? (From: Paul Bruneau <email@hidden>)

  • Prev by Date: Re: IKImageBrowserView Dragging outside
  • Next by Date: NSTableView Always Undesirably Selects First Row when It Loses Key Focus
  • Previous by thread: Bindings, am I doing right by MVC?
  • Next by thread: Avoid Compiler Warning regarding IB 3.2
  • Index(es):
    • Date
    • Thread