Re: KVC-compliance using -respondsToSelector:
Re: KVC-compliance using -respondsToSelector:
- Subject: Re: KVC-compliance using -respondsToSelector:
- From: Allan Odgaard <email@hidden>
- Date: Sat, 17 Jul 2004 21:31:46 +0200
On 17. Jul 2004, at 8:48, Brent Gulanowski wrote:
I'm wrapping another class which can have varying properties. [...]
What other kinds of problems could happen and can they be fixed? [...]
I think the best way to handle this is to implement setValue:forKey: in
the class which wraps the actual object.
You can then selectively forward this to the wrapped object, and
setValue:forKey: will be smart enough to call set<Key>: on the wrapped
object, if such method exists.
For more info see:
<
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
ObjC_classic/Protocols/NSKeyValueCoding.html#//apple_ref/doc/uid/
20000471/BABEHECF>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.