From a0aadbfc6fdd7f80bd6a74457094443b9ceeedeb Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 28 Mar 2012 21:30:33 +0000 Subject: - Fix an exception when refreshing the navigator view --- Source/SPNavigatorController.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/SPNavigatorController.m b/Source/SPNavigatorController.m index 359d7b17..54f817cc 100644 --- a/Source/SPNavigatorController.m +++ b/Source/SPNavigatorController.m @@ -581,10 +581,10 @@ static NSComparisonResult compareStrings(NSString *s1, NSString *s2, void* conte { // Reset everything for current active doc connection - id doc = [[NSApp delegate] frontDocument]; - if(!doc) return; + SPDatabaseDocument *doc = [[NSApp delegate] frontDocument]; + if (!doc) return; NSString *connectionID = [doc connectionID]; - if(!connectionID || [connectionID length] < 2) return; + if (!connectionID || [connectionID length] < 2) return; [searchField setStringValue:@""]; [schemaDataFiltered removeAllObjects]; @@ -600,8 +600,8 @@ static NSComparisonResult compareStrings(NSString *s1, NSString *s2, void* conte [syncButton setState:NSOffState]; isFiltered = NO; - if(![[doc valueForKeyPath:@"mySQLConnection"] isConnected]) return; - [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:[doc valueForKeyPath:@"mySQLConnection"] withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]]; + if (![[doc getConnection] isConnected]) return; + [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:[doc databaseStructureRetrieval] withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]]; } -- cgit v1.2.3