• 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: KVO and the observeValueForKeyPath bottleneck
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KVO and the observeValueForKeyPath bottleneck


  • Subject: Re: KVO and the observeValueForKeyPath bottleneck
  • From: Scott Anguish <email@hidden>
  • Date: Fri, 21 Jul 2006 04:11:07 -0400

in my original reply, when I said controller I meant specifically NS*Controller
On Jul 20, 2006, at 9:57 PM, Matt Neuburg wrote:


For example, I'm using bind: to cause my main app controller, MyObject, to
have its "paths" ivar synced with a "paths" value supplied (thru manual KVO)
by a matrix subclass, MyMatrix. Would you try to claim that this is wrong?

as much as I can tell here, yes.

The recommendation is that bindings should not be used between two model objects. Binding views directly to model objects should only be done (and even then it isn't something that is currently suggested) when there is no updating of the values due to changes in the U (essentially read-only).

In short, I have come to see the warning against bind: as a kind of canard;
it is a cute but purely theoretical grumble.

We've talked at length with engineering about it, and it isn't something that we suggest doing.


 Isn't that exactly what
bindings are for??? m.

bindings are intended to eliminate glue code between views and model objects

KVO is the better solution. if the observeValeForKeyPath: method is a bottleneck or results in ugly code it is quite possible to encapsulate that observing code into an object... _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: KVO and the observeValueForKeyPath bottleneck
      • From: George Orthwein <email@hidden>
References: 
 >Re: KVO and the observeValueForKeyPath bottleneck (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: How to get the image mask path
  • Next by Date: UI controls in NSView
  • Previous by thread: Re: KVO and the observeValueForKeyPath bottleneck
  • Next by thread: Re: KVO and the observeValueForKeyPath bottleneck
  • Index(es):
    • Date
    • Thread