Re: setValue:forKey: and invocation forwarding

2010-07-13 Thread Fritz Anderson
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 ca

Re: setValue:forKey: and invocation forwarding

2010-07-13 Thread Graham Cox
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

Re: setValue:forKey: and invocation forwarding

2010-07-13 Thread glenn andreas
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 > wra

Re: setValue:forKey: and invocation forwarding

2010-07-13 Thread Mike Abdullah
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 bypasse