To be able to customize some of my NSTableview's behaviour, I created this new class to act as a controller for the table view.
@interface aTableViewController : NSObject<NSTableViewDelegate>
@end
@implementation aTableViewController
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
{
return 1;
}
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
{
return @"something";
}
- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
{}
@end
The existing table view is binded to an NSArrayController to get data, works beautifully. I used an NSObject to reference to this aTableViewController in the IB, and connect the table view's delegate to this controller object. However, none of these delegates ever got called.
Any suggestions? Thanks!