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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to