diff options
author | Max <post@wickenrode.com> | 2017-05-15 01:06:05 +0200 |
---|---|---|
committer | Max <post@wickenrode.com> | 2017-05-15 01:06:05 +0200 |
commit | b50d4e9a6f55c26d3fbe33b33d78063ad1e9e9fd (patch) | |
tree | 9daf588615b044a0e555ad11a88f780565ee9f38 | |
parent | 5c717e027db5d5ac2d4bd937d6539ea4c1993257 (diff) | |
download | sequelpro-b50d4e9a6f55c26d3fbe33b33d78063ad1e9e9fd.tar.gz sequelpro-b50d4e9a6f55c26d3fbe33b33d78063ad1e9e9fd.tar.bz2 sequelpro-b50d4e9a6f55c26d3fbe33b33d78063ad1e9e9fd.zip |
Apply changes from 23c4d04e433f9eb21872edacc41173e34ec45ac2 to SPTableContent (#2775)
-rw-r--r-- | Source/SPTableContent.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 0d33c1ae..4e3ee245 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -81,6 +81,7 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper @interface SPTableContent () - (BOOL)cancelRowEditing; +- (void)documentWillClose:(NSNotification *)notification; @end @@ -292,6 +293,10 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper selector:@selector(endDocumentTaskForTab:) name:SPDocumentTaskEndNotification object:tableDocumentInstance]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(documentWillClose:) + name:SPDocumentWillCloseNotification + object:tableDocumentInstance]; } #pragma mark - @@ -4135,6 +4140,13 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper tableRowsSelectable = YES; } +//this method is called right before the UI objects are deallocated +- (void)documentWillClose:(NSNotification *)notification +{ + // if a result load is in progress we must stop the timer or it may try to call invalid IBOutlets + [self clearTableLoadTimer]; +} + #pragma mark - #pragma mark KVO methods |