aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TablesList.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-01-21 14:15:33 +0000
committerBibiko <bibiko@eva.mpg.de>2010-01-21 14:15:33 +0000
commit0d1fff4494127c5676067c2c9bef597e7bc0ca94 (patch)
treeedbe8b8772bed7123ca129c030e4ae841286e183 /Source/TablesList.m
parentd1af3d55bace5a74766d29da0c72665989038067 (diff)
downloadsequelpro-0d1fff4494127c5676067c2c9bef597e7bc0ca94.tar.gz
sequelpro-0d1fff4494127c5676067c2c9bef597e7bc0ca94.tar.bz2
sequelpro-0d1fff4494127c5676067c2c9bef597e7bc0ca94.zip
• added call to update the completion list to neuralgic places
- next steps to minimize the traffic - ie manipulating the dict directly without querying - follows
Diffstat (limited to 'Source/TablesList.m')
-rw-r--r--Source/TablesList.m26
1 files changed, 25 insertions, 1 deletions
diff --git a/Source/TablesList.m b/Source/TablesList.m
index 645e2305..e784f862 100644
--- a/Source/TablesList.m
+++ b/Source/TablesList.m
@@ -1315,7 +1315,10 @@
// Set window title
[tableWindow setTitle:[tableDocumentInstance displaySPName]];
- }
+ // Query the structure of all databases in the background (mainly for completion)
+ [NSThread detachNewThreadSelector:@selector(queryDbStructure) toTarget:mySQLConnection withObject:nil];
+
+ }
else {
// Error while renaming
alertSheetOpened = YES;
@@ -1871,6 +1874,10 @@
[tableWindow setTitle:[tableDocumentInstance displaySPName]];
[tablesListView deselectAll:self];
+
+ // Query the structure of all databases in the background (mainly for completion)
+ [NSThread detachNewThreadSelector:@selector(queryDbStructure) toTarget:mySQLConnection withObject:nil];
+
}
/**
@@ -1965,6 +1972,10 @@
[self updateFilter:self];
[tablesListView scrollRowToVisible:[tablesListView selectedRow]];
[self updateSelectionWithTaskString:[NSString stringWithFormat:NSLocalizedString(@"Loading %@...", @"Loading table task string"), selectedTableName]];
+
+ // Query the structure of all databases in the background (mainly for completion)
+ [NSThread detachNewThreadSelector:@selector(queryDbStructure) toTarget:mySQLConnection withObject:nil];
+
}
else {
// Error while creating new table
@@ -2154,6 +2165,10 @@
[self updateFilter:self];
[tablesListView scrollRowToVisible:[tablesListView selectedRow]];
[self updateSelectionWithTaskString:[NSString stringWithFormat:NSLocalizedString(@"Loading %@...", @"Loading table task string"), selectedTableName]];
+
+ // Query the structure of all databases in the background (mainly for completion)
+ [NSThread detachNewThreadSelector:@selector(queryDbStructure) toTarget:mySQLConnection withObject:nil];
+
}
}
}
@@ -2181,6 +2196,10 @@
selectedTableName = [[NSString alloc] initWithString:[tableRenameField stringValue]];
[tablesListView reloadData];
[self updateSelectionWithTaskString:[NSString stringWithFormat:NSLocalizedString(@"Loading %@...", @"Loading table task string"), selectedTableName]];
+
+ // Query the structure of all databases in the background (mainly for completion)
+ [NSThread detachNewThreadSelector:@selector(queryDbStructure) toTarget:mySQLConnection withObject:nil];
+
return;
}
} else {
@@ -2243,12 +2262,17 @@
selectedTableName = [[NSString alloc] initWithString:[tableRenameField stringValue]];
[tablesListView reloadData];
[self updateSelectionWithTaskString:[NSString stringWithFormat:NSLocalizedString(@"Loading %@...", @"Loading table task string"), selectedTableName]];
+
+ // Query the structure of all databases in the background (mainly for completion)
+ [NSThread detachNewThreadSelector:@selector(queryDbStructure) toTarget:mySQLConnection withObject:nil];
+
return;
}
}
// Set window title
[tableWindow setTitle:[tableDocumentInstance displaySPName]];
+
}
/*