mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 16:10:48 +00:00
Add code to instnatiate the NSTableCellView if the delegate method does not exist
This commit is contained in:
parent
74487bcfa5
commit
b06b23c97c
1 changed files with 16 additions and 9 deletions
|
@ -3531,19 +3531,26 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
|
|||
/* Draw the row between startingColumn and endingColumn */
|
||||
for (i = startingColumn; i <= endingColumn; i++)
|
||||
{
|
||||
NSView *view = nil;
|
||||
|
||||
tb = [tableColumns objectAtIndex: i];
|
||||
if ([delegate respondsToSelector: @selector(tableView:viewForTableColumn:row:)])
|
||||
{
|
||||
NSView *view = [delegate tableView: tableView
|
||||
viewForTableColumn: tb
|
||||
row: rowIndex];
|
||||
NSDebugLog(@"View = %@", view);
|
||||
drawingRect = [tableView frameOfCellAtColumn: i
|
||||
row: rowIndex];
|
||||
|
||||
[view setFrame: drawingRect];
|
||||
[tableView addSubview: view];
|
||||
view = [delegate tableView: tableView
|
||||
viewForTableColumn: tb
|
||||
row: rowIndex];
|
||||
}
|
||||
else
|
||||
{
|
||||
view = AUTORELEASE([[NSTableCellView alloc] init]);
|
||||
}
|
||||
|
||||
NSDebugLog(@"View = %@", view);
|
||||
drawingRect = [tableView frameOfCellAtColumn: i
|
||||
row: rowIndex];
|
||||
|
||||
[view setFrame: drawingRect];
|
||||
[tableView addSubview: view];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue