Re: How to get observe KVO changes to *every* key for an object?
Re: How to get observe KVO changes to *every* key for an object?
- Subject: Re: How to get observe KVO changes to *every* key for an object?
- From: Sherm Pendley <email@hidden>
- Date: Sat, 14 May 2005 02:18:44 -0400
On May 14, 2005, at 12:37 AM, Dan Wood - Discussion Lists wrote:
I have a class with lots of properties that are modified with an
inspector using bindings. I need to observe changes to *all* of
the keys to have my view refresh itself (in a non-bindings way).
Would a dependent key work for you? Like this:
+(void) initialize {
[self setKeys: [NSArray arrayWithObjects: @"foo", @"bar",
@"baz", nil]
triggerChangeNotificationsForDependentKey:
@"somethingChanged"];
}
Then connect your observer to the "somethingChanged" property.
Because "somethingChanged" is dependent on "foo", "bar", and "baz",
the observer will be notified when any of those are changed.
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden