• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: KVC-compliance using -respondsToSelector:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: KVC-compliance using -respondsToSelector:
      • From: Brent Gulanowski <email@hidden>
References: 
 >KVC-compliance using -respondsToSelector: (From: Brent Gulanowski <email@hidden>)

  • Prev by Date: Re: Cocoa semantics
  • Next by Date: iChat perspective view
  • Previous by thread: KVC-compliance using -respondsToSelector:
  • Next by thread: Re: KVC-compliance using -respondsToSelector:
  • Index(es):
    • Date
    • Thread