Re: Key-Value pairs
Re: Key-Value pairs
- Subject: Re: Key-Value pairs
- From: "Michael Ash" <email@hidden>
- Date: Tue, 3 Jun 2008 12:42:00 +0800
On Tue, Jun 3, 2008 at 5:41 AM, Hamish Allan <email@hidden> wrote:
> On Mon, Jun 2, 2008 at 10:30 PM, john darnell
> <email@hidden> wrote:
>
>> I just read Hillegass' chapter that introduces Key-Value coding.
>
>> My question is, if this is such a necessary thing, why didn't the
>> designers simply design the compiler to auto-generate setter and getter
>> functions as per the requisite style in the first place?
>
> I haven't read Hillegaas' latest book, but perhaps in a less
> introductory chapter he will go on to talk about @synthesise, which
> does exactly what you're looking for.
Also even without @synthesize, KVC will work just fine with no
accessors present. The KVC implementation will happily extract the
value directly from your instance variable by using its name, or put a
new value into it.
Mike
_______________________________________________
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