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: mmalcolm crawford <email@hidden>
- Date: Sat, 26 Feb 2005 05:04:19 +0100
On Feb 25, 2005, at 8:52 PM, Bert Torfs wrote:
Re: Binding name must be same as ivar name?
Bindings should match getters and setters. If you have an iVar named
foo with setters/getters called setThatStupidFoo and thatStupidFoo,
you should bind to 'thatStupidFoo'. Binding to foo will also work,
because Cocoa considers the method with the name of the Ivar as an
implicit setter.
Again, this is not the same issue as that Ricky originally raised.
Given two Ivars named 'familyName' and 'firstName', you could define
a getter called 'fullName' that returns the concatenation of the two.
You can then bind a column to 'fullName' and it will work - even if
there is not an Ivar called 'fullName'.
Strictly speaking, this will only work reliably if you set fullName as
being dependent on familyName and firstName.
mmalc
_______________________________________________
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