I'm attempting to add columns dynamically to an NSTableView
but they don't display anything:
NSTableColumn *col = [[NSTableColumn alloc] initWithIdentifier:@"test"];
[[col headerCell] setStringValue:@"Header"];
[myTableView addTableColumn:col];
Later I set each object up with the "test" key in a loop
[myObject setObject:@"Cell value" forKey:@"test"];
[myObjectArray addObject:processData];
Then I set arrangedObjectsForMyTableView
, which is bound to the table view in IB to the array I just built:
[self setArrangedObjectsForMyTableView:myObjectArray];
What I would expect is that there is a column with a header saying "Header" and each cell in the column says "Cell value", thanks to the identifier and the key. The column and header are visible but the cells are all empty. What am I missing?