• 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: 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
References: 
 >Re: Binding name must be same as ivar name? (From: Bert Torfs <email@hidden>)

  • Prev by Date: Re: NSAffineTransforms not working as expected?
  • Next by Date: Re: NSAffineTransforms not working as expected?
  • Previous by thread: Re: Binding name must be same as ivar name?
  • Next by thread: Custom bindings in a control/cell pair
  • Index(es):
    • Date
    • Thread