From 86aaa250e53fe6f631447351b9ec03741529cf98 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 30 May 2018 20:07:55 +0200 Subject: 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 --- Source/SPNarrowDownCompletion.h | 2 +- Source/SPNarrowDownCompletion.m | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'Source') diff --git a/Source/SPNarrowDownCompletion.h b/Source/SPNarrowDownCompletion.h index 020340a8..670d1a29 100644 --- a/Source/SPNarrowDownCompletion.h +++ b/Source/SPNarrowDownCompletion.h @@ -32,7 +32,7 @@ @class SPDatabaseStructure; -@interface SPNarrowDownCompletion : NSWindow +@interface SPNarrowDownCompletion : NSWindow { NSArray* suggestions; NSMutableString* mutablePrefix; diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index fd6fd38c..af5b2428 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -163,6 +163,9 @@ 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); @@ -353,7 +356,7 @@ [[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]; @@ -557,7 +560,6 @@ [b setEditable:NO]; [b setAlignment:NSRightTextAlignment]; [b setFont:[NSFont systemFontOfSize:11]]; - [b setDelegate:self]; return b; } -- cgit v1.2.3