Re: KVG generic enough?
Re: KVG generic enough?
- Subject: Re: KVG generic enough?
- From: Jens Alfke <email@hidden>
- Date: Wed, 18 Jul 2012 16:16:57 -0700
On Jul 18, 2012, at 6:08 AM, William Squires <email@hidden> wrote:
> But it seems like the fact that there's no way to specify (or grab) the value of the property in a generic-enough manner would be a problem - anyone using it would still have to know the data type of the property they want to access, and thus they might as well just use the accessors.
No, not really, since values can be used (as type 'id') without having to worry about their class.
For example, key-value-observing (KVO) and bindings use KVC in a generic way, without having to care what the exact types of properties are. The runtime support for nibs can also use KVC to assign values to outlets.
Is there something generic that you'd like to do with KVC that you can't figure out how to do?
—Jens
_______________________________________________
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