On Jan 26, 2009, at 7:45 PM, I. Savant wrote:
... sorry?
How does implementing one delegate method that's directly targeted
at the very problem you're trying to solve "complicate things"?
I was confused about what to return from the method if I just wanted
the data cell preserved as is. It turned out to be really simple, but
the solution didn't hit me on the first few passes.
- (NSCell *) tableView:(NSTableView *) tableView
dataCellForTableColumn:(NSTableColumn *) tableColumn
row:(NSInteger) row
{
if ([[tableColumn identifier] isEqualToString: @"delete"] &&
(row == [[controller arrangedObjects] count] - 1))
return addCell;
else
return [tableColumn dataCellForRow: row];
}
Thanks for your help. It was in typing up a rebuttal, that I stumbled
upon this solution. Simple, clean, elegant. I guess delegates DO have
a purpose :)
Thanks again
- Ken
_______________________________________________
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