• 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 paradigm
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bindings paradigm


  • Subject: Re: Bindings paradigm
  • From: Chris Hanson <email@hidden>
  • Date: Sat, 10 Jul 2004 15:37:54 -0700

On Jul 10, 2004, at 1:18 PM, Gwynne wrote:
#2 is pretty simple, but to me it seems to violate the principle of KVC because it doesn't represent any data in the model but rather a state of the view that would have been the controller's responsibility before bindings came along.

It doesn't really violate encapsulation, because the value you'd be exposing represents the ability to perform some manipulation on your model object. So don't call it "action"ButtonEnabled, call it can"Action".

You can even use +setKeys:triggerChangeNotificationsForDependentKey: to indicate that changes to the values of any of the keys used to determine whether you can perform the desired action will result in an update of the key indicating whether the action can be performed. Or you can just use a setter to manipulate its value...

-- Chris

--
Chris Hanson <email@hidden>
http://www.livejournal.com/users/chanson/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Bindings paradigm (From: Gwynne <email@hidden>)

  • Prev by Date: Re: NSThread sleepUntilDate /CORRECTION
  • Next by Date: Re: NSThread sleepUntilDate /CORRECTION
  • Previous by thread: Re: Bindings paradigm
  • Next by thread: plist issues driving me crazy
  • Index(es):
    • Date
    • Thread