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: Bert Torfs <email@hidden>
- Date: Fri, 25 Feb 2005 20:52:10 +0100
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.
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'. Note that a setter is a little bit
harder in this case, as the setter should split whatever the user
enters into a name and a first name.
Bert
_______________________________________________
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