Re: Propagating change in object graph
Re: Propagating change in object graph
- Subject: Re: Propagating change in object graph
- From: "Raphael Sebbe" <email@hidden>
- Date: Thu, 6 Sep 2007 21:28:53 +0200
hmm... seems good ;-)
Raphael
On 9/6/07, Shawn Erickson <email@hidden> wrote:
>
> 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