• 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
KVC and Core Foundation types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

KVC and Core Foundation types


  • Subject: KVC and Core Foundation types
  • From: Graham Cox <email@hidden>
  • Date: Fri, 01 Feb 2013 14:36:01 +1100

Hi all,

I have objects which have numerous properties that are CF types rather than NSObject-derived types, e.g.

@property CGPathRef  path;

I've just found that these properties can't be accessed using KVC, and in turn that means archiving doesn't work either, since I use KVC to iterate through a set of property keys when archiving.

What's a good general way to allow KVC and archiving to work with these properties? Reworking everything to use NSObjects is not really on, since these would still end up wrapping many of the these CF types. I had been assuming that somehow the KVC mechanism knew how to wrap these objects, or otherwise handle them, but no. It makes me wonder how other objects in the system, e.g. CALayer, which have many similar CF type properties, are able to support NSCoding and KVC.

--Graham



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: KVC and Core Foundation types
      • From: Seth Willits <email@hidden>
  • Prev by Date: Re: Getting file type from Save dlog
  • Next by Date: Re: KVC and Core Foundation types
  • Previous by thread: Re: Binding problem with core data
  • Next by thread: Re: KVC and Core Foundation types
  • Index(es):
    • Date
    • Thread