aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextViewAdditions.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-12-09 21:26:48 +0000
committerBibiko <bibiko@eva.mpg.de>2010-12-09 21:26:48 +0000
commit370e35a72e344c5a2c29ff76cdf1e84b4f475807 (patch)
tree6763723d0dd99f276d7b453ecc4f0b274ecc7f8f /Source/SPTextViewAdditions.m
parent3187b984cc76491bf1aabacdf8b2deb5046eaf0a (diff)
downloadsequelpro-370e35a72e344c5a2c29ff76cdf1e84b4f475807.tar.gz
sequelpro-370e35a72e344c5a2c29ff76cdf1e84b4f475807.tar.bz2
sequelpro-370e35a72e344c5a2c29ff76cdf1e84b4f475807.zip
• Bundle commands
- added the shell vars for edited field info as well if Field Editor sheet is used
Diffstat (limited to 'Source/SPTextViewAdditions.m')
-rw-r--r--Source/SPTextViewAdditions.m11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index c85b5c51..5dd7d06c 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -578,9 +578,16 @@
[env setObject:bundleInputFilePath forKey:SPBundleShellVariableInputFilePath];
[env setObject:SPBundleScopeInputField forKey:SPBundleShellVariableScope];
-
id tableSource = [self delegate];
- if([[[tableSource class] description] isEqualToString:@"SPCopyTable"]) {
+ if([[[tableSource class] description] isEqualToString:@"SPFieldEditorController"]) {
+ NSDictionary *editedFieldInfo = [tableSource editedFieldInfo];
+ [env setObject:[editedFieldInfo objectForKey:@"colName"] forKey:SPBundleShellVariableCurrentEditedColumnName];
+ if([editedFieldInfo objectForKey:@"tableName"])
+ [env setObject:[editedFieldInfo objectForKey:@"tableName"] forKey:SPBundleShellVariableCurrentEditedTable];
+ [env setObject:[editedFieldInfo objectForKey:@"usedQuery"] forKey:SPBundleShellVariableUsedQueryForTable];
+ [env setObject:[editedFieldInfo objectForKey:@"tableSource"] forKey:SPBundleShellVariableDataTableSource];
+ }
+ else if([[[tableSource class] description] isEqualToString:@"SPCopyTable"]) {
NSInteger editedCol = [tableSource editedColumn];
if(editedCol > -1) {
NSString *colName = [[[[tableSource tableColumns] objectAtIndex:editedCol] headerCell] stringValue];