aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableContent.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-09-20 16:34:19 +0000
committerBibiko <bibiko@eva.mpg.de>2010-09-20 16:34:19 +0000
commit26eb1e9fb81f28b49ebe4b4e8977af965149b84c (patch)
treeee48e9147383246a307d327ae067efd9116fb4b7 /Source/SPTableContent.m
parent506a85bedbbb3ba4c32810b67eded9958409abd9 (diff)
downloadsequelpro-26eb1e9fb81f28b49ebe4b4e8977af965149b84c.tar.gz
sequelpro-26eb1e9fb81f28b49ebe4b4e8977af965149b84c.tar.bz2
sequelpro-26eb1e9fb81f28b49ebe4b4e8977af965149b84c.zip
• SPTableContent
- added at the end of [self loadTableValues] an alert if loading failed • SPContentFilterManager - removed any key bindings for hopefully getting rid of some "mutating method sent to immutable object" exceptions/crashes [1479, 1372, 1310, 295, 1227, 692, 149] - better handling of ESC to cancel the name in-cell editing in table - improved validations - some general code improvements - added/changed comments
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r--Source/SPTableContent.m13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index 122822a3..e79b2c36 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -698,8 +698,17 @@
// Notify listenters that the query has finished
[[NSNotificationCenter defaultCenter] postNotificationOnMainThreadWithName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
- // Trigger a full reload if required
- if (fullTableReloadRequired) [self reloadTable:self];
+ if ([mySQLConnection queryErrored] && ![mySQLConnection queryCancelled]) {
+ if(filterString)
+ SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"The table data couldn't be loaded presumably due to used filter clause. \n\nMySQL said: %@", @"message of panel when loading of table failed and presumably due to used filter argument"), [mySQLConnection getLastErrorMessage]]);
+ else
+ SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"The table data couldn't be loaded.\n\nMySQL said: %@", @"message of panel when loading of table failed"), [mySQLConnection getLastErrorMessage]]);
+ } else {
+ // Trigger a full reload if required
+ if (fullTableReloadRequired) [self reloadTable:self];
+ }
}
/**