Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix objc weak errors by removing an unused delegate (#3062)
This code still seems wrong, though: -tableView:objectValueForTableColumn:row: is not the appropriate place to return cell objects
  • Loading branch information
dmoagx committed May 30, 2018
1 parent f517fd3 commit 86aaa25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/SPNarrowDownCompletion.h
Expand Up @@ -32,7 +32,7 @@

@class SPDatabaseStructure;

@interface SPNarrowDownCompletion : NSWindow <NSTableViewDelegate, NSTableViewDataSource, NSTokenFieldCellDelegate>
@interface SPNarrowDownCompletion : NSWindow <NSTableViewDelegate, NSTableViewDataSource>
{
NSArray* suggestions;
NSMutableString* mutablePrefix;
Expand Down
6 changes: 4 additions & 2 deletions Source/SPNarrowDownCompletion.m
Expand Up @@ -163,6 +163,9 @@ - (void)dealloc
SPClear(mutablePrefix);
SPClear(textualInputCharacters);
SPClear(originalFilterString);
[theTableView setDataSource:nil];
[theTableView setDelegate:nil];
SPClear(theTableView);
if (staticPrefix) SPClear(staticPrefix);
if (syncArrowImages) SPClear(syncArrowImages);
if (suggestions) SPClear(suggestions);
Expand Down Expand Up @@ -353,7 +356,7 @@ - (void)setupInterface
[[scrollView verticalScroller] setControlSize:NSSmallControlSize];
[[scrollView horizontalScroller] setControlSize:NSSmallControlSize];

theTableView = [[[NSTableView alloc] initWithFrame:NSZeroRect] autorelease];
theTableView = [[NSTableView alloc] initWithFrame:NSZeroRect];
[theTableView setFocusRingType:NSFocusRingTypeNone];
[theTableView setAllowsEmptySelection:YES];
[theTableView setHeaderView:nil];
Expand Down Expand Up @@ -557,7 +560,6 @@ - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColu
[b setEditable:NO];
[b setAlignment:NSRightTextAlignment];
[b setFont:[NSFont systemFontOfSize:11]];
[b setDelegate:self];
return b;
}

Expand Down

0 comments on commit 86aaa25

Please sign in to comment.