diff options
author | Guillermo Ignacio Enriquez Gutierrez <ignacio@jp.ibm.com> | 2015-08-22 18:19:10 +0900 |
---|---|---|
committer | Guillermo Ignacio Enriquez Gutierrez <ignacio@jp.ibm.com> | 2015-08-22 18:19:10 +0900 |
commit | c10748c41d4ea518aef214bfbb38cc0ac4a61417 (patch) | |
tree | ce435efcc28425bf1e2f018378aa45492e7cecc7 /Source | |
parent | faa74fd74f4ce3fbaeff1dd1d3fc5b705ec7f09b (diff) | |
download | sequelpro-c10748c41d4ea518aef214bfbb38cc0ac4a61417.tar.gz sequelpro-c10748c41d4ea518aef214bfbb38cc0ac4a61417.tar.bz2 sequelpro-c10748c41d4ea518aef214bfbb38cc0ac4a61417.zip |
Correctly shows alert when table title couldn't be parsed
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPTableData.m | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/SPTableData.m b/Source/SPTableData.m index 4ad3f028..d3af3580 100644 --- a/Source/SPTableData.m +++ b/Source/SPTableData.m @@ -570,15 +570,13 @@ returningInclusively: NO ignoringQuotedStrings: NO]; if(fieldName == nil || [fieldName length] == 0) { -#warning NSAlert from background thread! (This whole function needs improvement) NSBeep(); - NSAlert *alert = [[NSAlert alloc] init]; - [alert addButtonWithTitle:NSLocalizedString(@"OK", @"OK button")]; - [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"“%@” couldn't be parsed. You can edit the column setup but the column will not be shown in the Content view; please report this issue to the Sequel Pro team using the Help menu item.", @"“%@” couldn't be parsed. You can edit the column setup but the column will not be shown in the Content view; please report this issue to the Sequel Pro team using the Help menu item."), fieldsParser]]; - [alert setMessageText:NSLocalizedString(@"Error while parsing CREATE TABLE syntax",@"error while parsing CREATE TABLE syntax")]; - [alert setAlertStyle:NSCriticalAlertStyle]; - [alert runModal]; - [alert release]; + SPOnewayAlertSheet( + NSLocalizedString(@"Error while parsing CREATE TABLE syntax",@"error while parsing CREATE TABLE syntax"), + nil, + nil, + [NSString stringWithFormat:NSLocalizedString(@"“%@” couldn't be parsed. You can edit the column setup but the column will not be shown in the Content view; please report this issue to the Sequel Pro team using the Help menu item.", @"“%@” couldn't be parsed. You can edit the column setup but the column will not be shown in the Content view; please report this issue to the Sequel Pro team using the Help menu item."), fieldsParser], + NSCriticalAlertStyle); continue; } //if the next character is again a backtick, we stumbled across an escaped backtick. we have to continue parsing. |