On Jan 31, 2013, at 8:33 PM, Seth Willits <[email protected]> wrote:

> On Jan 31, 2013, at 7:36 PM, Graham Cox wrote:
> 
>> 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.
> 
> While I can't say whether or not CALayer does it, you could override 
> valueForKey: and handle those properties yourself.

CALayer almost certainly does, because it functions as an extensible KVC 
container (basically, it's like a dictionary in that you can call 
-setValue:forKey: with any key your heart desires).

Graham, the docs for -valueForKey: imply that it will work with any type, 
object or not: 
http://developer.apple.com/library/ios/documentation/cocoa/conceptual/KeyValueCoding/Articles/DataTypes.html

But CFTypes *are* NSObjects. So I'm not sure why your case isn't working. Can 
you be more specific?

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to