From 26eb1e9fb81f28b49ebe4b4e8977af965149b84c Mon Sep 17 00:00:00 2001 From: Bibiko Date: Mon, 20 Sep 2010 16:34:19 +0000 Subject: =?UTF-8?q?=E2=80=A2=20SPTableContent=20-=20added=20at=20the=20end?= =?UTF-8?q?=20of=20[self=20loadTableValues]=20an=20alert=20if=20loading=20?= =?UTF-8?q?failed=20=E2=80=A2=20SPContentFilterManager=20-=20removed=20any?= =?UTF-8?q?=20key=20bindings=20for=20hopefully=20getting=20rid=20of=20some?= =?UTF-8?q?=20"mutating=20method=20sent=20to=20immutable=20object"=20=20ex?= =?UTF-8?q?ceptions/crashes=20[1479,=201372,=201310,=20295,=201227,=20692,?= =?UTF-8?q?=20149]=20-=20better=20handling=20of=20ESC=20to=20cancel=20the?= =?UTF-8?q?=20name=20in-cell=20editing=20in=20table=20-=20improved=20valid?= =?UTF-8?q?ations=20-=20some=20general=20code=20improvements=20-=20added/c?= =?UTF-8?q?hanged=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPTableContent.m | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Source/SPTableContent.m') 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]; + } } /** -- cgit v1.2.3