aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPAppController.m8
-rw-r--r--Source/SPBundleEditorController.m85
-rw-r--r--Source/SPBundleHTMLOutputController.m25
-rw-r--r--Source/SPConstants.h26
-rw-r--r--Source/SPConstants.m50
-rw-r--r--Source/SPCopyTable.m2
-rw-r--r--Source/SPDatabaseDocument.m26
-rw-r--r--Source/SPStringAdditions.m22
-rw-r--r--Source/SPTextViewAdditions.m2
9 files changed, 152 insertions, 94 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m
index a002f5cf..cf36d161 100644
--- a/Source/SPAppController.m
+++ b/Source/SPAppController.m
@@ -770,7 +770,7 @@
NSMutableDictionary *env = [NSMutableDictionary dictionary];
[env setObject:[infoPath stringByDeletingLastPathComponent] forKey:SPBundleShellVariableBundlePath];
[env setObject:bundleInputFilePath forKey:SPBundleShellVariableInputFilePath];
- [env setObject:SPBundleScopeGeneral forKey:SPBundleShellVariableScope];
+ [env setObject:SPBundleScopeGeneral forKey:SPBundleShellVariableBundleScope];
NSString *input = @"";
NSError *inputFileError = nil;
@@ -910,7 +910,7 @@
if(!currentQueryRange.length)
currentQueryRange = currentSelectionRange;
- [env setObject:SPBundleScopeInputField forKey:SPBundleShellVariableScope];
+ [env setObject:SPBundleScopeInputField forKey:SPBundleShellVariableBundleScope];
if(selfIsQueryEditor && [[firstResponder delegate] currentQueryRange].length)
[env setObject:[[firstResponder string] substringWithRange:[[firstResponder delegate] currentQueryRange]] forKey:SPBundleShellVariableCurrentQuery];
@@ -940,10 +940,10 @@
[env setObject:[sel componentsJoinedByString:@"\t"] forKey:SPBundleShellVariableSelectedRowIndices];
}
- [env setObject:SPBundleScopeDataTable forKey:SPBundleShellVariableScope];
+ [env setObject:SPBundleScopeDataTable forKey:SPBundleShellVariableBundleScope];
} else {
- [env setObject:SPBundleScopeGeneral forKey:SPBundleShellVariableScope];
+ [env setObject:SPBundleScopeGeneral forKey:SPBundleShellVariableBundleScope];
}
return env;
}
diff --git a/Source/SPBundleEditorController.m b/Source/SPBundleEditorController.m
index 034200b1..dffcb20c 100644
--- a/Source/SPBundleEditorController.m
+++ b/Source/SPBundleEditorController.m
@@ -304,48 +304,49 @@
[commandBundleTreeController setSortDescriptors:[NSArray arrayWithObjects:sortDescriptor, nil]];
shellVariableSuggestions = [[NSArray arrayWithObjects:
- @"SP_ALL_DATABASES",
- @"SP_ALL_FUNCTIONS",
- @"SP_ALL_PROCEDURES",
- @"SP_ALL_TABLES",
- @"SP_ALL_VIEWS",
- @"SP_APP_RESOURCES_DIRECTORY",
- @"SP_BUNDLE_EXIT_INSERT_AS_SNIPPET",
- @"SP_BUNDLE_EXIT_INSERT_AS_TEXT",
- @"SP_BUNDLE_EXIT_NONE",
- @"SP_BUNDLE_EXIT_REPLACE_CONTENT",
- @"SP_BUNDLE_EXIT_REPLACE_SELECTION",
- @"SP_BUNDLE_EXIT_SHOW_AS_HTML",
- @"SP_BUNDLE_EXIT_SHOW_AS_HTML_TOOLTIP",
- @"SP_BUNDLE_EXIT_SHOW_AS_TEXT_TOOLTIP",
- @"SP_BUNDLE_INPUT",
- @"SP_BUNDLE_INPUT_TABLE_METADATA",
- @"SP_BUNDLE_PATH",
- @"SP_BUNDLE_SCOPE",
- @"SP_CURRENT_EDITED_COLUMN_NAME",
- @"SP_CURRENT_EDITED_TABLE",
- @"SP_CURRENT_HOST",
- @"SP_CURRENT_LINE",
- @"SP_CURRENT_PORT",
- @"SP_CURRENT_QUERY",
- @"SP_CURRENT_USER",
- @"SP_CURRENT_WORD",
- @"SP_DATA_TABLE_SOURCE",
- @"SP_DATABASE_ENCODING",
- @"SP_ICON_FILE",
- @"SP_PROCESS_ID",
- @"SP_QUERY_FILE",
- @"SP_QUERY_RESULT_FILE",
- @"SP_QUERY_RESULT_META_FILE",
- @"SP_QUERY_RESULT_STATUS_FILE",
- @"SP_RDBMS_TYPE",
- @"SP_RDBMS_VERSION",
- @"SP_SELECTED_DATABASE",
- @"SP_SELECTED_ROW_INDICES",
- @"SP_SELECTED_TABLE",
- @"SP_SELECTED_TABLES",
- @"SP_SELECTED_TEXT",
- @"SP_USED_QUERY_FOR_TABLE",
+ SPBundleShellVariableAllDatabases,
+ SPBundleShellVariableAllFunctions,
+ SPBundleShellVariableAllProcedures,
+ SPBundleShellVariableAllTables,
+ SPBundleShellVariableAllViews,
+ SPBundleShellVariableAppResourcesDirectory,
+ SPBundleShellVariableBlobFileDirectory,
+ SPBundleShellVariableExitInsertAsSnippet,
+ SPBundleShellVariableExitInsertAsText,
+ SPBundleShellVariableExitNone,
+ SPBundleShellVariableExitReplaceContent,
+ SPBundleShellVariableExitReplaceSelection,
+ SPBundleShellVariableExitInsertAsHTML,
+ SPBundleShellVariableExitInsertAsHTMLTooltip,
+ SPBundleShellVariableExitInsertAsTextTooltip,
+ SPBundleShellVariableInputFilePath,
+ SPBundleShellVariableInputTableMetaData,
+ SPBundleShellVariableBundlePath,
+ SPBundleShellVariableBundleScope,
+ SPBundleShellVariableCurrentEditedColumnName,
+ SPBundleShellVariableCurrentEditedTable,
+ SPBundleShellVariableCurrentHost,
+ SPBundleShellVariableCurrentLine,
+ SPBundleShellVariableCurrentPort,
+ SPBundleShellVariableCurrentQuery,
+ SPBundleShellVariableCurrentUser,
+ SPBundleShellVariableCurrentWord,
+ SPBundleShellVariableDataTableSource,
+ SPBundleShellVariableDatabaseEncoding,
+ SPBundleShellVariableIconFile,
+ SPBundleShellVariableProcessID,
+ SPBundleShellVariableQueryFile,
+ SPBundleShellVariableQueryResultFile,
+ SPBundleShellVariableQueryResultMetaFile,
+ SPBundleShellVariableQueryResultStatusFile,
+ SPBundleShellVariableRDBMSType,
+ SPBundleShellVariableRDBMSVersion,
+ SPBundleShellVariableSelectedDatabase,
+ SPBundleShellVariableSelectedRowIndices,
+ SPBundleShellVariableSelectedTable,
+ SPBundleShellVariableSelectedTables,
+ SPBundleShellVariableSelectedText,
+ SPBundleShellVariableUsedQueryForTable,
nil
] retain];
diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m
index 1e002ab8..a632a51a 100644
--- a/Source/SPBundleHTMLOutputController.m
+++ b/Source/SPBundleHTMLOutputController.m
@@ -304,19 +304,28 @@
- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
{
- SPBeginAlertSheet(NSLocalizedString(@"JavaScript Alert", @"javascript alert"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [self window], self, nil, nil,
- [message description]);
+ NSAlert *alert = [[NSAlert alloc] init];
+ [alert addButtonWithTitle:NSLocalizedString(@"OK", @"OK button")];
+ [alert setInformativeText:(message)?:@""];
+ [alert setMessageText:@"JavaScript"];
+ [alert runModal];
+ [alert release];
}
- (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
{
- NSLog(@"confirm");
- return NO;
-}
+ NSAlert *alert = [[NSAlert alloc] init];
+ [alert addButtonWithTitle:NSLocalizedString(@"OK", @"OK button")];
+ [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"cancel button")];
+ [alert setInformativeText:(message)?:@""];
+ [alert setMessageText:@"JavaScript"];
-- (NSString *)webView:(WebView *)sender runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText initiatedByFrame:(WebFrame *)frame
-{
- return @"be patient";
+ NSUInteger returnCode = [alert runModal];
+
+ [alert release];
+
+ if(returnCode == NSAlertFirstButtonReturn) return YES;
+ return NO;
}
- (void)webView:(WebView *)sender windowScriptObjectAvailable: (WebScriptObject *)windowScriptObject
diff --git a/Source/SPConstants.h b/Source/SPConstants.h
index 804a067f..7d85d2b7 100644
--- a/Source/SPConstants.h
+++ b/Source/SPConstants.h
@@ -501,7 +501,7 @@ extern NSString *SPBundleShellVariableQueryResultFile;
extern NSString *SPBundleShellVariableQueryResultStatusFile;
extern NSString *SPBundleShellVariableQueryResultMetaFile;
extern NSString *SPBundleShellVariableInputTableMetaData;
-extern NSString *SPBundleShellVariableScope;
+extern NSString *SPBundleShellVariableBundleScope;
extern NSString *SPBundleShellVariableUsedQueryForTable;
extern NSString *SPBundleShellVariableCurrentEditedColumnName;
extern NSString *SPBundleShellVariableSelectedTable;
@@ -512,6 +512,30 @@ extern NSString *SPBundleShellVariableSelectedText;
extern NSString *SPBundleShellVariableCurrentWord;
extern NSString *SPBundleShellVariableCurrentLine;
extern NSString *SPBundleShellVariableSelectedRowIndices;
+extern NSString *SPBundleShellVariableAllDatabases;
+extern NSString *SPBundleShellVariableSelectedTables;
+extern NSString *SPBundleShellVariableSelectedDatabase;
+extern NSString *SPBundleShellVariableRDBMSVersion;
+extern NSString *SPBundleShellVariableRDBMSType;
+extern NSString *SPBundleShellVariableProcessID;
+extern NSString *SPBundleShellVariableIconFile;
+extern NSString *SPBundleShellVariableAppResourcesDirectory;
+extern NSString *SPBundleShellVariableExitNone;
+extern NSString *SPBundleShellVariableExitReplaceSelection;
+extern NSString *SPBundleShellVariableExitReplaceContent;
+extern NSString *SPBundleShellVariableExitInsertAsText;
+extern NSString *SPBundleShellVariableExitInsertAsSnippet;
+extern NSString *SPBundleShellVariableExitInsertAsHTML;
+extern NSString *SPBundleShellVariableExitInsertAsTextTooltip;
+extern NSString *SPBundleShellVariableExitInsertAsHTMLTooltip;
+extern NSString *SPBundleShellVariableCurrentHost;
+extern NSString *SPBundleShellVariableCurrentUser;
+extern NSString *SPBundleShellVariableCurrentPort;
+extern NSString *SPBundleShellVariableDatabaseEncoding;
+extern NSString *SPBundleShellVariableAllProcedures;
+extern NSString *SPBundleShellVariableAllFunctions;
+extern NSString *SPBundleShellVariableAllViews;
+extern NSString *SPBundleShellVariableAllTables;
extern const NSInteger SPBundleRedirectActionNone;
extern const NSInteger SPBundleRedirectActionReplaceSection;
diff --git a/Source/SPConstants.m b/Source/SPConstants.m
index e6ce8771..d118b6b6 100644
--- a/Source/SPConstants.m
+++ b/Source/SPConstants.m
@@ -305,26 +305,50 @@ NSString *SPBundleTaskScriptCommandFilePath = @"/tmp/SP_BUNDLE_S
NSString *SPBundleTaskCopyBlobFileDirectory = @"/tmp/SP_BUNDLE_COPY_BLOB_FILES";
NSString *SPBundleTaskTableMetaDataFilePath = @"/tmp/SP_BUNDLE_TABLE_META_DATA";
+NSString *SPBundleShellVariableAllDatabases = @"SP_ALL_DATABASES";
+NSString *SPBundleShellVariableAllFunctions = @"SP_ALL_FUNCTIONS";
+NSString *SPBundleShellVariableAllProcedures = @"SP_ALL_PROCEDURES";
+NSString *SPBundleShellVariableAllTables = @"SP_ALL_TABLES";
+NSString *SPBundleShellVariableAllViews = @"SP_ALL_VIEWS";
+NSString *SPBundleShellVariableAppResourcesDirectory = @"SP_APP_RESOURCES_DIRECTORY";
+NSString *SPBundleShellVariableBlobFileDirectory = @"SP_BUNDLE_BLOB_FILES_DIRECTORY";
+NSString *SPBundleShellVariableBundlePath = @"SP_BUNDLE_PATH";
+NSString *SPBundleShellVariableBundleScope = @"SP_BUNDLE_SCOPE";
+NSString *SPBundleShellVariableCurrentEditedColumnName = @"SP_CURRENT_EDITED_COLUMN_NAME";
+NSString *SPBundleShellVariableCurrentEditedTable = @"SP_CURRENT_EDITED_TABLE";
+NSString *SPBundleShellVariableCurrentHost = @"SP_CURRENT_HOST";
+NSString *SPBundleShellVariableCurrentLine = @"SP_CURRENT_LINE";
+NSString *SPBundleShellVariableCurrentPort = @"SP_CURRENT_PORT";
+NSString *SPBundleShellVariableCurrentQuery = @"SP_CURRENT_QUERY";
+NSString *SPBundleShellVariableCurrentUser = @"SP_CURRENT_USER";
+NSString *SPBundleShellVariableCurrentWord = @"SP_CURRENT_WORD";
+NSString *SPBundleShellVariableDatabaseEncoding = @"SP_DATABASE_ENCODING";
+NSString *SPBundleShellVariableDataTableSource = @"SP_DATA_TABLE_SOURCE";
+NSString *SPBundleShellVariableExitInsertAsHTML = @"SP_BUNDLE_EXIT_SHOW_AS_HTML";
+NSString *SPBundleShellVariableExitInsertAsHTMLTooltip = @"SP_BUNDLE_EXIT_SHOW_AS_HTML_TOOLTIP";
+NSString *SPBundleShellVariableExitInsertAsSnippet = @"SP_BUNDLE_EXIT_INSERT_AS_SNIPPET";
+NSString *SPBundleShellVariableExitInsertAsText = @"SP_BUNDLE_EXIT_INSERT_AS_TEXT";
+NSString *SPBundleShellVariableExitInsertAsTextTooltip = @"SP_BUNDLE_EXIT_SHOW_AS_TEXT_TOOLTIP";
+NSString *SPBundleShellVariableExitNone = @"SP_BUNDLE_EXIT_NONE";
+NSString *SPBundleShellVariableExitReplaceContent = @"SP_BUNDLE_EXIT_REPLACE_CONTENT";
+NSString *SPBundleShellVariableExitReplaceSelection = @"SP_BUNDLE_EXIT_REPLACE_SELECTION";
+NSString *SPBundleShellVariableIconFile = @"SP_ICON_FILE";
NSString *SPBundleShellVariableInputFilePath = @"SP_BUNDLE_INPUT";
+NSString *SPBundleShellVariableInputTableMetaData = @"SP_BUNDLE_INPUT_TABLE_METADATA";
NSString *SPBundleShellVariableOutputFilePath = @"SP_BUNDLE_OUTPUT";
-NSString *SPBundleShellVariableBundlePath = @"SP_BUNDLE_PATH";
-NSString *SPBundleShellVariableBlobFileDirectory = @"SP_BUNDLE_BLOB_FILES_DIRECTORY";
+NSString *SPBundleShellVariableProcessID = @"SP_PROCESS_ID";
NSString *SPBundleShellVariableQueryFile = @"SP_QUERY_FILE";
NSString *SPBundleShellVariableQueryResultFile = @"SP_QUERY_RESULT_FILE";
-NSString *SPBundleShellVariableQueryResultStatusFile = @"SP_QUERY_RESULT_STATUS_FILE";
NSString *SPBundleShellVariableQueryResultMetaFile = @"SP_QUERY_RESULT_META_FILE";
-NSString *SPBundleShellVariableInputTableMetaData = @"SP_BUNDLE_INPUT_TABLE_METADATA";
-NSString *SPBundleShellVariableScope = @"SP_BUNDLE_SCOPE";
-NSString *SPBundleShellVariableUsedQueryForTable = @"SP_USED_QUERY_FOR_TABLE";
-NSString *SPBundleShellVariableCurrentEditedColumnName = @"SP_CURRENT_EDITED_COLUMN_NAME";
+NSString *SPBundleShellVariableQueryResultStatusFile = @"SP_QUERY_RESULT_STATUS_FILE";
+NSString *SPBundleShellVariableRDBMSType = @"SP_RDBMS_TYPE";
+NSString *SPBundleShellVariableRDBMSVersion = @"SP_RDBMS_VERSION";
+NSString *SPBundleShellVariableSelectedDatabase = @"SP_SELECTED_DATABASE";
+NSString *SPBundleShellVariableSelectedRowIndices = @"SP_SELECTED_ROW_INDICES";
NSString *SPBundleShellVariableSelectedTable = @"SP_SELECTED_TABLE";
-NSString *SPBundleShellVariableCurrentEditedTable = @"SP_CURRENT_EDITED_TABLE";
-NSString *SPBundleShellVariableDataTableSource = @"SP_DATA_TABLE_SOURCE";
-NSString *SPBundleShellVariableCurrentQuery = @"SP_CURRENT_QUERY";
+NSString *SPBundleShellVariableSelectedTables = @"SP_SELECTED_TABLES";
NSString *SPBundleShellVariableSelectedText = @"SP_SELECTED_TEXT";
-NSString *SPBundleShellVariableCurrentWord = @"SP_CURRENT_WORD";
-NSString *SPBundleShellVariableCurrentLine = @"SP_CURRENT_LINE";
-NSString *SPBundleShellVariableSelectedRowIndices = @"SP_SELECTED_ROW_INDICES";
+NSString *SPBundleShellVariableUsedQueryForTable = @"SP_USED_QUERY_FOR_TABLE";
const NSInteger SPBundleRedirectActionNone = 200;
const NSInteger SPBundleRedirectActionReplaceSection = 201;
diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m
index 1d833b76..7a132348 100644
--- a/Source/SPCopyTable.m
+++ b/Source/SPCopyTable.m
@@ -1153,7 +1153,7 @@ NSInteger kBlobAsImageFile = 4;
[env setObject:[[self delegate] usedQuery] forKey:SPBundleShellVariableUsedQueryForTable];
[env setObject:bundleInputTableMetaDataFilePath forKey:SPBundleShellVariableInputTableMetaData];
- [env setObject:SPBundleScopeDataTable forKey:SPBundleShellVariableScope];
+ [env setObject:SPBundleScopeDataTable forKey:SPBundleShellVariableBundleScope];
if([self numberOfSelectedRows]) {
NSMutableArray *sel = [NSMutableArray array];
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 731ff3c6..144f0710 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -4820,47 +4820,47 @@
if (tablesListInstance) {
if([tablesListInstance selectedDatabase])
- [env setObject:[tablesListInstance selectedDatabase] forKey:@"SP_SELECTED_DATABASE"];
+ [env setObject:[tablesListInstance selectedDatabase] forKey:SPBundleShellVariableSelectedDatabase];
if ([tablesListInstance tableName])
[env setObject:[tablesListInstance tableName] forKey:SPBundleShellVariableSelectedTable];
if ([tablesListInstance selectedTableItems])
- [env setObject:[[tablesListInstance selectedTableItems] componentsJoinedByString:@"\t"] forKey:@"SP_SELECTED_TABLES"];
+ [env setObject:[[tablesListInstance selectedTableItems] componentsJoinedByString:@"\t"] forKey:SPBundleShellVariableSelectedTables];
if ([tablesListInstance allDatabaseNames])
- [env setObject:[[tablesListInstance allDatabaseNames] componentsJoinedByString:@"\t"] forKey:@"SP_ALL_DATABASES"];
+ [env setObject:[[tablesListInstance allDatabaseNames] componentsJoinedByString:@"\t"] forKey:SPBundleShellVariableAllDatabases];
if ([tablesListInstance allTableNames])
- [env setObject:[[tablesListInstance allTableNames] componentsJoinedByString:@"\t"] forKey:@"SP_ALL_TABLES"];
+ [env setObject:[[tablesListInstance allTableNames] componentsJoinedByString:@"\t"] forKey:SPBundleShellVariableAllTables];
if ([tablesListInstance allViewNames])
- [env setObject:[[tablesListInstance allViewNames] componentsJoinedByString:@"\t"] forKey:@"SP_ALL_VIEWS"];
+ [env setObject:[[tablesListInstance allViewNames] componentsJoinedByString:@"\t"] forKey:SPBundleShellVariableAllViews];
if ([tablesListInstance allFunctionNames])
- [env setObject:[[tablesListInstance allFunctionNames] componentsJoinedByString:@"\t"] forKey:@"SP_ALL_FUNCTIONS"];
+ [env setObject:[[tablesListInstance allFunctionNames] componentsJoinedByString:@"\t"] forKey:SPBundleShellVariableAllFunctions];
if ([tablesListInstance allProcedureNames])
- [env setObject:[[tablesListInstance allProcedureNames] componentsJoinedByString:@"\t"] forKey:@"SP_ALL_PROCEDURES"];
+ [env setObject:[[tablesListInstance allProcedureNames] componentsJoinedByString:@"\t"] forKey:SPBundleShellVariableAllProcedures];
if ([self user])
- [env setObject:[self user] forKey:@"SP_CURRENT_USER"];
+ [env setObject:[self user] forKey:SPBundleShellVariableCurrentUser];
if ([self host])
- [env setObject:[self host] forKey:@"SP_CURRENT_HOST"];
+ [env setObject:[self host] forKey:SPBundleShellVariableCurrentHost];
if ([self port])
- [env setObject:[self port] forKey:@"SP_CURRENT_PORT"];
+ [env setObject:[self port] forKey:SPBundleShellVariableCurrentPort];
- [env setObject:([self databaseEncoding])?:@"" forKey:@"SP_DATABASE_ENCODING"];
+ [env setObject:([self databaseEncoding])?:@"" forKey:SPBundleShellVariableDatabaseEncoding];
}
if(1)
- [env setObject:@"mysql" forKey:@"SP_RDBMS_TYPE"];
+ [env setObject:@"mysql" forKey:SPBundleShellVariableRDBMSType];
if([self mySQLVersion])
- [env setObject:[self mySQLVersion] forKey:@"SP_RDBMS_VERSION"];
+ [env setObject:[self mySQLVersion] forKey:SPBundleShellVariableRDBMSVersion];
return (NSDictionary*)env;
}
diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m
index a3098750..b523907c 100644
--- a/Source/SPStringAdditions.m
+++ b/Source/SPStringAdditions.m
@@ -519,16 +519,16 @@
NSMutableDictionary *theEnv = [NSMutableDictionary dictionary];
[theEnv setDictionary:shellEnvironment];
- [theEnv setObject:[[NSBundle mainBundle] pathForResource:@"appicon" ofType:@"icns"] forKey:@"SP_ICON_FILE"];
- [theEnv setObject:[NSString stringWithFormat:@"%@/Contents/Resources", [[NSBundle mainBundle] bundlePath]] forKey:@"SP_APP_RESOURCES_DIRECTORY"];
- [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionNone] forKey:@"SP_BUNDLE_EXIT_NONE"];
- [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionReplaceSection] forKey:@"SP_BUNDLE_EXIT_REPLACE_SELECTION"];
- [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionReplaceContent] forKey:@"SP_BUNDLE_EXIT_REPLACE_CONTENT"];
- [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionInsertAsText] forKey:@"SP_BUNDLE_EXIT_INSERT_AS_TEXT"];
- [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionInsertAsSnippet] forKey:@"SP_BUNDLE_EXIT_INSERT_AS_SNIPPET"];
- [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionShowAsHTML] forKey:@"SP_BUNDLE_EXIT_SHOW_AS_HTML"];
- [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionShowAsTextTooltip] forKey:@"SP_BUNDLE_EXIT_SHOW_AS_TEXT_TOOLTIP"];
- [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionShowAsHTMLTooltip] forKey:@"SP_BUNDLE_EXIT_SHOW_AS_HTML_TOOLTIP"];
+ [theEnv setObject:[[NSBundle mainBundle] pathForResource:@"appicon" ofType:@"icns"] forKey:SPBundleShellVariableIconFile];
+ [theEnv setObject:[NSString stringWithFormat:@"%@/Contents/Resources", [[NSBundle mainBundle] bundlePath]] forKey:SPBundleShellVariableAppResourcesDirectory];
+ [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionNone] forKey:SPBundleShellVariableExitNone];
+ [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionReplaceSection] forKey:SPBundleShellVariableExitReplaceSelection];
+ [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionReplaceContent] forKey:SPBundleShellVariableExitReplaceContent];
+ [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionInsertAsText] forKey:SPBundleShellVariableExitInsertAsText];
+ [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionInsertAsSnippet] forKey:SPBundleShellVariableExitInsertAsSnippet];
+ [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionShowAsHTML] forKey:SPBundleShellVariableExitInsertAsHTML];
+ [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionShowAsTextTooltip] forKey:SPBundleShellVariableExitInsertAsTextTooltip];
+ [theEnv setObject:[NSNumber numberWithInteger:SPBundleRedirectActionShowAsHTMLTooltip] forKey:SPBundleShellVariableExitInsertAsHTMLTooltip];
// Create and set an unique process ID for each SPDatabaseDocument which has to passed
// for each sequelpro:// scheme command as user to be able to identify the url scheme command.
@@ -558,7 +558,7 @@
[doc setProcessID:uuid];
- [theEnv setObject:uuid forKey:@"SP_PROCESS_ID"];
+ [theEnv setObject:uuid forKey:SPBundleShellVariableProcessID];
[theEnv setObject:[NSString stringWithFormat:@"%@%@", SPURLSchemeQueryInputPathHeader, uuid] forKey:SPBundleShellVariableQueryFile];
[theEnv setObject:[NSString stringWithFormat:@"%@%@", SPURLSchemeQueryResultPathHeader, uuid] forKey:SPBundleShellVariableQueryResultFile];
[theEnv setObject:[NSString stringWithFormat:@"%@%@", SPURLSchemeQueryResultStatusPathHeader, uuid] forKey:SPBundleShellVariableQueryResultStatusFile];
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index a37895b8..11defa20 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -576,7 +576,7 @@
NSMutableDictionary *env = [NSMutableDictionary dictionary];
[env setObject:[infoPath stringByDeletingLastPathComponent] forKey:SPBundleShellVariableBundlePath];
[env setObject:bundleInputFilePath forKey:SPBundleShellVariableInputFilePath];
- [env setObject:SPBundleScopeInputField forKey:SPBundleShellVariableScope];
+ [env setObject:SPBundleScopeInputField forKey:SPBundleShellVariableBundleScope];
id tableSource = [self delegate];
if([[[tableSource class] description] isEqualToString:@"SPFieldEditorController"]) {