• 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
Can a model key path binding access a super class property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can a model key path binding access a super class property


  • Subject: Can a model key path binding access a super class property
  • From: Grant Christensen <email@hidden>
  • Date: Sun, 17 Jan 2010 23:53:51 +1000

Hi all,

I have two classes, one defining a few base properties, and another more specific class inheriting from it.  Example below:

@interface BBSBaseClass : NSObject {
	NSString	*aValue;
}

@property (readwrite, copy) NSString	*aValue;

@end

@interface BBSMoreSpecific : BBSBaseClass {
	NSString	*anotherValue;
}
@property (readwrite, assign) NSString	*anotherValue;

@end

In my window I have a NSTableView that is using an array controller to get access to my data.  The array controller is bound to an array of BBSMoreSpecific classes.

The problem I am having is that all of my columns bound to the fields in the BBSMoreSpecific class show their data, but those bound to those in the base class do not.  I am using a simple model key path of just the name of the ivar, so aValue and anotherValue.

Can the bindings access the base class or can they only access values in the class the array controller is directly connected to?

regards,

---
Grant Christensen




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Can a model key path binding access a super class property
      • From: James Bucanek <email@hidden>
  • Prev by Date: NSDrawNinePartImage crash, autorelease sent to freed object
  • Next by Date: Re: NSURLRequest and NSOperationQueue
  • Previous by thread: NSDrawNinePartImage crash, autorelease sent to freed object
  • Next by thread: Re: Can a model key path binding access a super class property
  • Index(es):
    • Date
    • Thread