aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMax <dmoagx@users.noreply.github.com>2018-05-30 20:07:55 +0200
committerMax <dmoagx@users.noreply.github.com>2018-05-30 23:07:16 +0200
commit86aaa250e53fe6f631447351b9ec03741529cf98 (patch)
treeefb037ed67226601a9ea18387ac507efedaca1a7 /Source
parentf517fd31245e91738071db66e7ab33a6072b6b07 (diff)
downloadsequelpro-86aaa250e53fe6f631447351b9ec03741529cf98.tar.gz
sequelpro-86aaa250e53fe6f631447351b9ec03741529cf98.tar.bz2
sequelpro-86aaa250e53fe6f631447351b9ec03741529cf98.zip
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
Diffstat (limited to 'Source')
-rw-r--r--Source/SPNarrowDownCompletion.h2
-rw-r--r--Source/SPNarrowDownCompletion.m6
2 files changed, 5 insertions, 3 deletions
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 <NSTableViewDelegate, NSTableViewDataSource, NSTokenFieldCellDelegate>
+@interface SPNarrowDownCompletion : NSWindow <NSTableViewDelegate, NSTableViewDataSource>
{
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;
}