aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextViewAdditions.m
diff options
context:
space:
mode:
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];