aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-11-05 00:00:23 +0000
committerrowanbeentje <rowan@beent.je>2009-11-05 00:00:23 +0000
commit4cc035fd625bc2ee76927cf9e7649af829ce8482 (patch)
tree170a8ac6da319e002f48e1ca561f55f5177d4209 /Source/TableContent.m
parent97fd0957cef34210caece133fee16a370e5b9f5d (diff)
downloadsequelpro-4cc035fd625bc2ee76927cf9e7649af829ce8482.tar.gz
sequelpro-4cc035fd625bc2ee76927cf9e7649af829ce8482.tar.bz2
sequelpro-4cc035fd625bc2ee76927cf9e7649af829ce8482.zip
- Alter query start/stop notifications to apply to only the originating window, regardless of key state, by passing in and looking for the table document instance
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r--Source/TableContent.m14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m
index 29b92a73..6130c5c5 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -239,7 +239,7 @@
}
// Post a notification that a query will be performed
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:tableDocumentInstance];
// Retrieve the field names and types for this table from the data cache. This is used when requesting all data as part
// of the fieldListForQuery method, and also to decide whether or not to preserve the current filter/sort settings.
@@ -459,7 +459,7 @@
[tableContentView setTableInstance:self withTableData:tableValues withColumns:dataColumns withTableName:selectedTable withConnection:mySQLConnection];
// Post the notification that the query is finished
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
// Clear any details to restore now that they have been restored
[self clearDetailsToRestore];
@@ -486,7 +486,7 @@
[countText setStringValue:NSLocalizedString(@"Loading table data...", @"Loading table data string")];
// Notify any listeners that a query has started
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:tableDocumentInstance];
// Start construction of the query string
queryString = [NSMutableString stringWithFormat:@"SELECT %@ FROM %@", [self fieldListForQuery], [selectedTable backtickQuotedString]];
@@ -562,7 +562,7 @@
[self updateCountText];
// Notify listenters that the query has finished
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
}
/*
@@ -1488,13 +1488,13 @@
return YES;
}
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:tableDocumentInstance];
// If editing, compare the new row to the old row and if they are identical finish editing without saving.
if (!isEditingNewRow && [oldRow isEqualToArray:[tableValues objectAtIndex:currentlyEditingRow]]) {
isEditingRow = NO;
currentlyEditingRow = -1;
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
return YES;
}
@@ -1574,7 +1574,7 @@
}
[mySQLConnection queryString:queryString];
[fieldValues release];
- [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
// If no rows have been changed, show error if appropriate.
if ( ![mySQLConnection affectedRows] && ![mySQLConnection getLastErrorMessage] && ![[mySQLConnection getLastErrorMessage] length]) {