aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-06-01 00:10:02 +0000
committerrowanbeentje <rowan@beent.je>2010-06-01 00:10:02 +0000
commita2d64457e1c52d2d72863407537e950c80595231 (patch)
treeef59124222e77a56bcf88ce446626bd6aa6e8eed /Source/SPDatabaseDocument.m
parentf5e5d40e5e9569470e52cbaaba4d4352dc2a71d7 (diff)
downloadsequelpro-a2d64457e1c52d2d72863407537e950c80595231.tar.gz
sequelpro-a2d64457e1c52d2d72863407537e950c80595231.tar.bz2
sequelpro-a2d64457e1c52d2d72863407537e950c80595231.zip
- Ensure start/end query notifications are sent on the main thread to avoid the interface being updated from the wrong thread on listeners
- Add a "Support Files" folder to MCPKit, containing NSNotificationAdditions to support main thread notifications from within MCPKit
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 92f83a79..72cf201b 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -1085,7 +1085,7 @@
NSString *dbName = nil;
// Notify listeners that a query has started
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+ [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadWithName:@"SMySQLQueryWillBePerformed" object:self];
MCPResult *theResult = [mySQLConnection queryString:@"SELECT DATABASE()"];
if (![mySQLConnection queryErrored]) {
@@ -1110,7 +1110,7 @@
}
//query finished
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadWithName:@"SMySQLQueryHasBeenPerformed" object:self];
}
- (BOOL)navigatorSchemaPathExistsForDatabase:(NSString*)dbname