Re: Alternative KVC accessors
Re: Alternative KVC accessors
- Subject: Re: Alternative KVC accessors
- From: Shane Stanley <email@hidden>
- Date: Sun, 03 Jan 2010 11:44:15 +1100
- Thread-topic: Alternative KVC accessors
On 3/1/10 5:32 AM, "Mike Abdullah" <email@hidden> wrote:
> This sounds a pretty odd approach, and is also going to give you pretty
> confusing code to read.
It's not ideal, for sure. But it gives me a usable getter as long as I use
valueForKey: calls, and therefore works fine with bindings, which is my main
concern. The fact that I can't use normal getters is going to make any
solution a compromise; even within the same class, I'm always going to have
to use some kind of workaround.
> Instead, how about synthesising a property of the
> form:
>
> -primitive<Key>
>
> And then write a getter in -<key> form, so that it internally calls the
> -primitive<Key> getter?
Thanks, I thought of something like that, but wondered whether it was making
things more complicated, especially when several properties are involved.
The good news is that I probably don't have much call for custom getters in
ASObjC...
--
Shane Stanley <email@hidden>
AppleScript Pro, April 2010, Florida <http://www.applescriptpro.com>
_______________________________________________
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