Propagating change in object graph
Propagating change in object graph
- Subject: Propagating change in object graph
- From: "Raphael Sebbe" <email@hidden>
- Date: Thu, 6 Sep 2007 10:00:14 +0200
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,
Raphael
_______________________________________________
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