• 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: Jim Correia <email@hidden>
  • Date: Thu, 24 Feb 2005 08:42:39 -0500

On Feb 24, 2005, at 8:00 AM, Ricky Sharp wrote:

Have I misread the quote in the documentation? Must the names of bindings match the ivars? If a binding name can be different, is there anything else I need to provide in my code to 'map the binding name to an ivar'?

You need to follow KVC conventions either in iVar naming or accessor naming.


@interface Foo : NSObject
{
	int	fred;
}

@end

@implementation Foo

- (void)setBob:(int)val
{
	fred = val;
}

- (int)bob
{
	return fred;
}

@end

Jim

_______________________________________________
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: Ricky Sharp <email@hidden>
References: 
 >Binding name must be same as ivar name? (From: Ricky Sharp <email@hidden>)

  • Prev by Date: NSArchiving and NSUnarchiving multiple objects
  • Next by Date: Re: Help. How to use the argument list passed in NSApplicationMain?
  • Previous by thread: Binding name must be same as ivar name?
  • Next by thread: Re: Binding name must be same as ivar name?
  • Index(es):
    • Date
    • Thread