aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPNavigatorController.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-03-28 21:30:33 +0000
committerrowanbeentje <rowan@beent.je>2012-03-28 21:30:33 +0000
commita0aadbfc6fdd7f80bd6a74457094443b9ceeedeb (patch)
tree4f32441eb56e76f4686b76c5b95dfe5cef265bf8 /Source/SPNavigatorController.m
parent036c96a237f2f956cfd5c20495f26c80085bddb1 (diff)
downloadsequelpro-a0aadbfc6fdd7f80bd6a74457094443b9ceeedeb.tar.gz
sequelpro-a0aadbfc6fdd7f80bd6a74457094443b9ceeedeb.tar.bz2
sequelpro-a0aadbfc6fdd7f80bd6a74457094443b9ceeedeb.zip
- Fix an exception when refreshing the navigator view
Diffstat (limited to 'Source/SPNavigatorController.m')
-rw-r--r--Source/SPNavigatorController.m10
1 files 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]];
}