• 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: Propagating change in object graph
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Propagating change in object graph


  • Subject: Re: Propagating change in object graph
  • From: Shawn Erickson <email@hidden>
  • Date: Thu, 06 Sep 2007 07:13:16 -0700


On Sep 6, 2007, at 1:00 AM, Raphael Sebbe wrote:

Hi the list,
I have a quite generic question about how to propagate changes in a Cocoa
app. I have used some different paradigms for this, each with different
pros/cons. I would be interested in getting some thoughts about this, what
are your established way of doing it...


Think of it as a view that needs to redisplay itself when properties of an
object deep in the graph change.


1. Use NSNotificationCenter, pass the object, etc. (cons: notification is
sent to all observer, across documents...)
2. Use KVO (seems complicated when a deep object is part of a to N relation)
3. Send message up in the graph : point -> curve -> drawing -> document,
(requires back pointers + specific methods)


Thanks for sharing,

You can create your own notifications centers if you want to scope who is observing what.


-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: Propagating change in object graph
      • From: "Raphael Sebbe" <email@hidden>
References: 
 >Propagating change in object graph (From: "Raphael Sebbe" <email@hidden>)

  • Prev by Date: Re: Waiting for a USB device to connect
  • Next by Date: Re: [ANN] RegexKit - An Objective-C Framework for Regular Expressions Using the PCRE Library
  • Previous by thread: Propagating change in object graph
  • Next by thread: Re: Propagating change in object graph
  • Index(es):
    • Date
    • Thread