Re: NSTableView -setDataCell confusion
Re: NSTableView -setDataCell confusion
- Subject: Re: NSTableView -setDataCell confusion
- From: Quincey Morris <email@hidden>
- Date: Sun, 28 Jun 2009 22:05:00 -0700
On Jun 27, 2009, at 13:18, Chase Meadors wrote:
I'm using AMIndeterminateProgressIndicatorCell (at least the drawing
code) to imitate a progress indicator in the table view. To get it
to use the custom cell, I've been calling
[myTableColumn setDataCell:[[MyCustomClass alloc] init]];
However, I've run into a 'slight' problem. Apparently, ALL of the
cells in this column are that one, same, object. When I tested with
F-script, I found that they have the exact same description, and
same memory address. This explains why bindings affecting one cell
would affect all of them...
So, in short, is there a +setCellClass method or similar for
NSTableColumn? Any way to make it use different objects?
You can use the table view delegate method:
tableView:dataCellForTableColumn:row:
to implement different cells for different rows.
_______________________________________________
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