• 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: is there a better way to observe when an object changes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bindings: is there a better way to observe when an object changes?


  • Subject: Re: Bindings: is there a better way to observe when an object changes?
  • From: "Shawn Erickson" <email@hidden>
  • Date: Mon, 10 Sep 2007 10:50:09 -0700

On 9/10/07, Simone Tellini <email@hidden> wrote:
> Hi,
>
> I've created an NSView subclass which needs to be redrawn every time
> an entity object changes, where "changes" means that any of its
> attributes change.
>
> Does anybody know a better way or should I stick with this
> implementation?

Does your view use "any of" the objects attributes? Likely the view is
only using a subset of items when drawing its representation ("view")
of the data. So in theory the view knows what is is using and it
should observe those and only those. ...granted theory and practice
are often different things.

If you have a complex interaction between properties of the data you
can bring sanity again by providing composite properties that hide the
interactions of these bits of data. In your case you are providing a
top level one that covers all properties ... however consider
providing ones better tuned to how your view would look at the data
(consider adding a category with these to note these are tuned toward
you view class(es), etc.).

-Shawn
_______________________________________________

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

  • Follow-Ups:
    • Re: Bindings: is there a better way to observe when an object changes?
      • From: Simone Tellini <email@hidden>
References: 
 >Bindings: is there a better way to observe when an object changes? (From: Simone Tellini <email@hidden>)

  • Prev by Date: Bindings: is there a better way to observe when an object changes?
  • Next by Date: Re: Bindings: is there a better way to observe when an object changes?
  • Previous by thread: Bindings: is there a better way to observe when an object changes?
  • Next by thread: Re: Bindings: is there a better way to observe when an object changes?
  • Index(es):
    • Date
    • Thread