aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TablesList.m
diff options
context:
space:
mode:
authormtvee <emptyvee@gmail.com>2009-05-15 04:38:33 +0000
committermtvee <emptyvee@gmail.com>2009-05-15 04:38:33 +0000
commitfa7f9811fbbbbee702acb1a5592f69fa7592f5c7 (patch)
treec75d20aeb6d8da8de49fcb5bb6278d77e981c907 /Source/TablesList.m
parentc271a152b7856fa04de00ba74e221904ae2c0c4c (diff)
downloadsequelpro-fa7f9811fbbbbee702acb1a5592f69fa7592f5c7.tar.gz
sequelpro-fa7f9811fbbbbee702acb1a5592f69fa7592f5c7.tar.bz2
sequelpro-fa7f9811fbbbbee702acb1a5592f69fa7592f5c7.zip
fixed #254 and an unreported bug in the constraint parser
Diffstat (limited to 'Source/TablesList.m')
-rw-r--r--Source/TablesList.m19
1 files changed, 13 insertions, 6 deletions
diff --git a/Source/TablesList.m b/Source/TablesList.m
index bd5a65e9..d8291598 100644
--- a/Source/TablesList.m
+++ b/Source/TablesList.m
@@ -521,11 +521,10 @@
while (currentIndex != NSNotFound)
{
- if([[tableTypes objectAtIndex:currentIndex] intValue] == SP_TABLETYPE_VIEW)
- {
+ if([[tableTypes objectAtIndex:currentIndex] intValue] == SP_TABLETYPE_VIEW) {
[mySQLConnection queryString: [NSString stringWithFormat: @"DROP VIEW %@",
- [[tables objectAtIndex:currentIndex] backtickQuotedString]
- ]];
+ [[tables objectAtIndex:currentIndex] backtickQuotedString]
+ ]];
} else if([[tableTypes objectAtIndex:currentIndex] intValue] == SP_TABLETYPE_TABLE) {
[mySQLConnection queryString: [NSString stringWithFormat: @"DROP TABLE %@",
[[tables objectAtIndex:currentIndex] backtickQuotedString]
@@ -563,9 +562,17 @@
// set window title
[tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@/%@", [tableDocumentInstance mySQLVersion],
[tableDocumentInstance name], [tableDocumentInstance database]]];
- if ( error )
+
+ if ( error ) {
+ /* the first sheet is not closed and we try and run this
NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
- [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove table.\nMySQL said: %@", @"message of panel when table cannot be removed"), errorText]);
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove table.\nMySQL said: %@", @"message of panel when table cannot be removed"), errorText]);
+ */
+ NSRunAlertPanel(NSLocalizedString(@"Error", @"error"),
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove table.\nMySQL said: %@", @"message of panel when table cannot be removed"), errorText],
+ NSLocalizedString(@"OK", @"OK button"), nil, nil, nil );
+ }
+
}
/**