aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDump.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-02-03 10:34:33 +0000
committerBibiko <bibiko@eva.mpg.de>2010-02-03 10:34:33 +0000
commitc9e9a6a1c8d8c9d0e40a45a2ce2d5d95cf1dafba (patch)
tree271313021ba56cbb86357da56d6158cf43509129 /Source/TableDump.m
parent4fe58d39c65438f13398a3617f06e2077840a176 (diff)
downloadsequelpro-c9e9a6a1c8d8c9d0e40a45a2ce2d5d95cf1dafba.tar.gz
sequelpro-c9e9a6a1c8d8c9d0e40a45a2ce2d5d95cf1dafba.tar.bz2
sequelpro-c9e9a6a1c8d8c9d0e40a45a2ce2d5d95cf1dafba.zip
• field mapping sheet is now document-modal instead of blocking SP entirely
• if an error occurred while retrieving column or index data in Structure pane reset Structure pane to a stable status, display the error message, and reload Tables List table due to the fact the it's very likely that SP tries to retrieve data from a table which doesn't exist anymore • fixed spelling of "occurred" Note: NOT YET DONE: if in Structure view the actual underlying table was deleted or renamed by an other mysql event and the user tries to add/change a field do suppress this attempt safely
Diffstat (limited to 'Source/TableDump.m')
-rw-r--r--Source/TableDump.m33
1 files changed, 24 insertions, 9 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m
index 15a8c344..b6f71c2c 100644
--- a/Source/TableDump.m
+++ b/Source/TableDump.m
@@ -103,6 +103,15 @@
[exportMultipleXMLTableView reloadData];
}
+- (IBAction)closeFieldMapperSheet:(id)sender
+{
+
+ [NSApp endSheet:fieldMappingSheet returnCode:[sender tag]];
+ // [[self window] orderOut:self];
+ //
+ // [NSApp endSheet:fieldMappingSheet];
+}
+
/**
* Common method for ending modal sessions
*/
@@ -1190,23 +1199,29 @@
// Trigger a table selection and setup
[self changeTable:self];
+ fieldMapperSheetStatus = 1;
+
// Show fieldMapping sheet
[NSApp beginSheet:fieldMappingSheet
modalForWindow:tableWindow
modalDelegate:self
- didEndSelector:nil
+ didEndSelector:@selector(fieldMapperDidEndSheet:returnCode:contextInfo:)
contextInfo:nil];
- NSInteger code = [NSApp runModalForWindow:fieldMappingSheet];
- [NSApp endSheet:fieldMappingSheet];
- [fieldMappingSheet orderOut:nil];
+ // Wait for fieldMappingSheet
+ while (fieldMapperSheetStatus == 1)
+ usleep(100000);
- // Return success or failure based on confirmation or cancellation
- if (code) {
- return TRUE;
- } else {
+ if(fieldMapperSheetStatus == 2)
+ return YES;
+ else
return FALSE;
- }
+
+}
+- (void)fieldMapperDidEndSheet:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
+{
+ [sheet orderOut:self];
+ fieldMapperSheetStatus = (returnCode) ? 2 : 3;
}
/*