I want to use a subclassed NSTextFieldCell, which I got this working before in a different project, but now I can't figure out want could be wrong. For now I simplified it to just an NSImageCell, and that won't work either.
The Log shows that aCell's class is an NSTextField, and the table view itself shows the description coming from the NSImage instance. I feel like I must be missing something obvious, but I don't know what.
Code:
- (id) tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(NSInteger)rowIndex {
id cell = [[[NSImageCell alloc] init] autorelease];
[cell setImage: [NSImage imageNamed: @"Cool.pdf"]];
return cell;
}
- (void) tableView:(NSTableView *)aTableView
willDisplayCell:(id)aCell
forTableColumn:(NSTableColumn *)aTableColumn
row:(NSInteger)rowIndex {
NSLog (@"%@", [aCell class]);
}
The Log shows that aCell's class is an NSTextField, and the table view itself shows the description coming from the NSImage instance. I feel like I must be missing something obvious, but I don't know what.