How to get observe KVO changes to *every* key for an object?
How to get observe KVO changes to *every* key for an object?
- Subject: How to get observe KVO changes to *every* key for an object?
- From: Dan Wood - Discussion Lists <email@hidden>
- Date: Fri, 13 May 2005 21:37:59 -0700
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). The
obvious way is to, for every single property, hook up my observer
with addObserver:forKeyPath:options:context: -- but doing so is a
hassle (there are a lot of properties to deal with -- I'd hate to
lose one) and in fact, because of the way that my class hierarchy
works, there are potentially even more properties that should trigger
a change if I subclass my model object!
So I'm wondering if anybody has any suggestions to essentially
capture & observer *any* property change to the object ... like [self
addObserver:self forKeyPath:@"*" ...] or some sort of interception of
setValue:forKey: or such?
Thanks.....
_______________________________________________
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