I have been trying unsuccessfully to use so-called "Header Cells" in my view-based (which I'd like to keep that way) NSOutlineView without success.
I have tried the following things:
I have successfully set up
-(BOOL)outlineView:(NSOutlineView *)outlineView isGroupItem:(id)item
for the object I want to make headers.I have thoroughly tested my delegate and data-source, so we can assume they are set up properly.
When it comes to
-(NSView *)outlineView:(NSOutlineView *)ov viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item
definition, I am stuck.
I had the feeling from my readings that there are things to set up in IB, but I can't figure out what. What is this @"HeaderCell"
referring to?
I tried this kind of stuff which are not successful at all (displays an empty-view)
-(NSView *)outlineView:(NSOutlineView *)ov viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item
{ NSTableCellView *result = nil;
result = [ov makeViewWithIdentifier:@"HeaderCell" owner:self];
[[result textField]setStringValue:@"myString"];
return result;
}
What am I missing ?