KVO and Object Arrays
KVO and Object Arrays
- Subject: KVO and Object Arrays
- From: Jake Carter <email@hidden>
- Date: Sat, 19 Apr 2008 22:13:43 -0700
Hey guys,
I have a KVO question. First, the setup:
Foo
NSMutableArray *bars;
Bar
NSString *name;
int number;
AppDelegate
NSMutableArray *foos;
So the AppDelegate will contain an array of Foo object and each Foo
object will have an array of Bar objects. I want to be able to observe
the bars from the AppDelegate to see when new bars are added or when a
property changes in each bar object. I know I can use
addObserver:forKeyPath:options:context: and add it to each key I want
to observe, but is there a better way to do this? Maybe some KVO magic
way to watch a whole tree of objects and their properties?
Thanks for any help,
:// Jake
_______________________________________________
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