Re: Binding name must be same as ivar name?
Re: Binding name must be same as ivar name?
- Subject: Re: Binding name must be same as ivar name?
- From: Ricky Sharp <email@hidden>
- Date: Thu, 24 Feb 2005 10:52:09 -0600
On Thursday, February 24, 2005, at 09:51AM, Sean McBride <email@hidden> wrote:
>On 2005-02-24 08:09, Ricky Sharp said:
>
>>Yes, I know this. All my iVars have appropriately named accessors. My
>>question is about the name of the _custom binding_ (i.e. the names used
>>in, among other calls, exposeBinding:
>
>The binding names in exposeBinding:, etc. must have matching kvc methods
>or an ivar with that name. So when you changed exposeBinding: from
>"baseColor" to "IIBaseColor", did you also change your accessors to
>setIIBaseColor: and IIBaseColor:? This wasn't clear to me from your
>original post, and i think its what Jim is talking about too.
Sorry for not being clear, but the issue at hand is really what the documentation [1] states (soon after Figure 6):
"Note that the binding name need not necessarily correspond to the name of an actual instance variable."
To me, this implies that the name used in exposeBinding can differ from the iVar (and accessor) names. But from observation of the problems and crashes, it appears that the binding name must be the same as the iVar name.
Perhaps I'm misreading that sentence somehow. Or, if it is indeed incorrect, I'll file a documentation bug.
[1] <http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/HowDoBindingsWork.html>
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden