It appears that calling -setValue:forKey: on an object bypasses or ignores any
invocation forwarding it has set up, unless I'm missing some obvious error.
I have an object that acts as a wrapper for another object, and so that the
wrapper can, under some circumstances, act as the thing it is
Sounds to me you subclassed the wrong class. KVC is provided by NSObject. If
you subclass NSProxy, the -setValue:forKey: message is not implemented, so will
get forwarded on like others.
On 13 Jul 2010, at 13:53, Graham Cox wrote:
It appears that calling -setValue:forKey: on an object
On Jul 13, 2010, at 7:53 AM, Graham Cox wrote:
It appears that calling -setValue:forKey: on an object bypasses or ignores
any invocation forwarding it has set up, unless I'm missing some obvious
error.
I have an object that acts as a wrapper for another object, and so that the
wrapper
On 13/07/2010, at 11:56 PM, glenn andreas wrote:
I'd just override valueForKey: and setValue:forKey: in your class to handle
forwarding those to your wrapped object.
Hi Glenn,
That's what I did actually, seems a much simpler approach anyway. I was just
curious as to whether this apparent
On 13 Jul 2010, at 7:53 AM, Graham Cox wrote:
It appears that calling -setValue:forKey: on an object bypasses or ignores
any invocation forwarding it has set up, unless I'm missing some obvious
error.
Aren't valueForUndefinedKey: and setValue:forUndefinedKey: provided for exactly
this