1

I have create a NSTableView and 2 NSTableColumn in the view. Both of the identifiers of these 2 NSTableColumn set to "Automatic" in Interface Builder.

In the method:

(NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row

I use

NSLog(@"%@", [tableColumn identifier])

to check the identifier of these 2 NSTableColumn.

I found the identifier of the first column is AutomaticTableColumnIdentifier.0 but the second is (null).

Is there any reason that the second column doesn't have a identifier?

I have reduced the attribute "Columns" of NSTableView to 1 and increased it to 2 later, so the first column is included in the NSTableView but the second is not.

Ruoxin Wang
  • 13
  • 1
  • 6

1 Answers1

2

This is likely the reason:

I have reduced the attribute "Columns" of NSTableView to 1 and increased it to 2 later, so the first column is included in the NSTableView but the second is not.

If it's causing you problems, set the identifiers in the nib.

paulmelnikow
  • 16,895
  • 8
  • 63
  • 114