From 8138d4dd043991af0472299711e254433ab6591a Mon Sep 17 00:00:00 2001 From: Bibiko Date: Wed, 31 Mar 2010 14:50:04 +0000 Subject: =?UTF-8?q?=E2=80=A2=20if=20document=20window=20will=20close=20sen?= =?UTF-8?q?t=20a=20'cancelPreviousPerformRequestsWithTarget'=20to=20the=20?= =?UTF-8?q?custom=20query=20editor=20to=20stop=20auto-completion=20and=20a?= =?UTF-8?q?uto-help=20timer=20to=20avoid=20crashes=20after=20closing=20?= =?UTF-8?q?=E2=80=A2=20improved=20some=20minor=20stuff=20for=20completion'?= =?UTF-8?q?s=20re-invocation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/TableDocument.m | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Source/TableDocument.m') diff --git a/Source/TableDocument.m b/Source/TableDocument.m index b2da29af..e850f443 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -3691,6 +3691,17 @@ - (void)windowWillClose:(NSNotification *)aNotification { + // Cancel autocompletion trigger + if([prefs boolForKey:SPCustomQueryAutoComplete]) + [NSObject cancelPreviousPerformRequestsWithTarget:[customQueryInstance valueForKeyPath:@"textView"] + selector:@selector(doAutoCompletion) + object:nil]; + if([prefs boolForKey:SPCustomQueryUpdateAutoHelp]) + [NSObject cancelPreviousPerformRequestsWithTarget:[customQueryInstance valueForKeyPath:@"textView"] + selector:@selector(autoHelp) + object:nil]; + + [[SPNavigatorController sharedNavigatorController] removeConnection:[self connectionID]]; [mySQLConnection setDelegate:nil]; -- cgit v1.2.3