• 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 to custom NSCell [Solved]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding to custom NSCell [Solved]


  • Subject: Re: Binding to custom NSCell [Solved]
  • From: Corbin Dunn <email@hidden>
  • Date: Fri, 13 Feb 2009 13:25:29 -0800


On Feb 12, 2009, at 8:53 PM, Ken Tozier wrote:

After looking at NSActionCell, I noticed the "setControlView" method and this seems to be the missing link. NSActionCell sets it's control view while NSCell does not. When I manually set the control view for my custom cell to the table that contains it, viola! It works.

So, for any other NSCell subclassers out there, the progression of steps is

MyCell 			*cell		= [[[MYCell alloc] init] autorelease];
NSTableColumn	*column		= [[[NSTableColumn alloc] init] autorelease];
NSTableView	*table		= [[NSTableView alloc] initWithFrame: aFrame];

[cell setControlView: table];
[column setDataCell: cell];
[table addTableColumn: column];

[column bind: @"value" toObject: arrayController withKeyPath: @"arrangedObjects.<key>" options: nil];

Hope this saves someone else a lost couple of days figuring this out...

As I mentioned before, logging a bug would be very useful; even if it is to just increase our documentation for how to do this. If you don't have the time to do so, also please let us know, as I will log the bug for you.


thanks,

corbin



_______________________________________________

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


References: 
 >Binding to custom NSCell (From: Ken Tozier <email@hidden>)
 >Re: Binding to custom NSCell (From: Ken Tozier <email@hidden>)
 >Re: Binding to custom NSCell (From: Corbin Dunn <email@hidden>)
 >Re: Binding to custom NSCell (From: Ken Tozier <email@hidden>)
 >Re: Binding to custom NSCell (From: Ken Tozier <email@hidden>)
 >Re: Binding to custom NSCell [Solved] (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: NSCollectionView inside an NSSplitView?
  • Next by Date: Programatically Uncheck "Change Picture" In Desktop Settings?
  • Previous by thread: Re: Binding to custom NSCell [Solved]
  • Next by thread: ProcessInformationCopyDictionary
  • Index(es):
    • Date
    • Thread