diff --git a/Headers/gnustep/gui/NSOutlineView.h b/Headers/gnustep/gui/NSOutlineView.h index 39d149ae1..d0e734830 100644 --- a/Headers/gnustep/gui/NSOutlineView.h +++ b/Headers/gnustep/gui/NSOutlineView.h @@ -169,11 +169,11 @@ shouldEditTableColumn: (NSTableColumn *)tableColumn shouldSelectItem: (id)item; - (BOOL) outlineView: (NSOutlineView *)outlineView shouldSelectTableColumn: (NSTableColumn *)tableColumn; -- (BOOL) outlineView: (NSOutlineView *)outlineView +- (void) outlineView: (NSOutlineView *)outlineView willDisplayCell: (id)cell forTableColumn: (NSTableColumn *)tableColumn item: (id)item; -- (BOOL) outlineView: (NSOutlineView *)outlineView +- (void) outlineView: (NSOutlineView *)outlineView willDisplayOutlineCell: (id)cell forTableColumn: (NSTableColumn *)tableColumn item: (id)item; diff --git a/Source/NSOutlineView.m b/Source/NSOutlineView.m index 778e9b085..c6925c802 100644 --- a/Source/NSOutlineView.m +++ b/Source/NSOutlineView.m @@ -780,9 +780,7 @@ static NSImage *unexpandable = nil; } - (void) setDelegate: (id)anObject -{ - SEL sel; - +{ if (_delegate) [nc removeObserver: _delegate name: nil object: self]; _delegate = anObject; @@ -801,10 +799,6 @@ static NSImage *unexpandable = nil; SET_DELEGATE_NOTIFICATION(ItemDidCollapse); SET_DELEGATE_NOTIFICATION(ItemWillExpand); SET_DELEGATE_NOTIFICATION(ItemWillCollapse); - - /* Cache */ - sel = @selector(outlineView:willDisplayCell:forTableColumn:row:); - sel = @selector(outlineView:setObjectValue:forTableColumn:row:); } - (void) encodeWithCoder: (NSCoder*)aCoder @@ -952,7 +946,7 @@ static NSImage *unexpandable = nil; tb = [_tableColumns objectAtIndex: i]; cell = [tb dataCellForRow: rowIndex]; - if (_del_responds) + if ([_delegate respondsToSelector: @selector(outlineView:willDisplayCell:forTableColumn:item:)]) { [_delegate outlineView: self willDisplayCell: cell