• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Binding name must be same as ivar name?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Binding name must be same as ivar name?
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Releasing what's in an array?
  • Next by Date: RE: NSTextView layout - less efficient when loaded from file?
  • Previous by thread: Re: Binding name must be same as ivar name?
  • Next by thread: Re: Binding name must be same as ivar name?
  • Index(es):
    • Date
    • Thread