When I attempt to construct a view per row for my view-based NSTableView
the method makeViewWithIdentifier:owner:
always returns nil. The table is build in IB and all seems to be linked properly, the delegate methods are all called as I'd expect. When looking through the Apple documentation about the makeViewWithIdentifier
-method I can't find a reason why the method will return nil. A snippet from the code:
- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
if ([tableColumn.identifier isEqualToString:@"foo"]) {
NSTableCellView *view = [tableView makeViewWithIdentifier:@"id" owner:self]; // Is always nil..
view.textField.stringValue = [myArray objectAtIndex: row];
return view;
}
return nil;
}
Why could view
be nil?