annotate Mac/PythonLauncher/MyDocument.m @ 58765:2ba7677bfa95 legacy-trunk

testCopysign was defined twice in test_math; combine the definitions
author Mark Dickinson <dickinsm@gmail.com>
date Sat, 06 Feb 2010 23:11:25 +0000
parents 3f84e6ae36da
children 7ec9255d4189
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1 //
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2 // MyDocument.m
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3 // PythonLauncher
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4 //
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5 // Created by Jack Jansen on Fri Jul 19 2002.
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
6 // Copyright (c) 2002 __MyCompanyName__. All rights reserved.
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
7 //
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
8
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
9 #import "MyDocument.h"
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
10 #import "MyAppDelegate.h"
24447
ddd6ff0693c4 Implemented starting Python in a terminal window. The implementation isn't
Jack Jansen <jack.jansen@cwi.nl>
parents: 24426
diff changeset
11 #import "doscript.h"
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
12
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
13 @implementation MyDocument
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
14
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
15 - (id)init
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
16 {
26398
a0d752be5577 Lots of restructuring, mostly suggested by Bill Bumgarner. Main
Jack Jansen <jack.jansen@cwi.nl>
parents: 24447
diff changeset
17 self = [super init];
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
18 if (self) {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
19
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
20 // Add your subclass-specific initialization here.
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
21 // If an error occurs here, send a [self dealloc] message and return nil.
26398
a0d752be5577 Lots of restructuring, mostly suggested by Bill Bumgarner. Main
Jack Jansen <jack.jansen@cwi.nl>
parents: 24447
diff changeset
22 script = [@"<no script>.py" retain];
a0d752be5577 Lots of restructuring, mostly suggested by Bill Bumgarner. Main
Jack Jansen <jack.jansen@cwi.nl>
parents: 24447
diff changeset
23 filetype = [@"Python Script" retain];
a0d752be5577 Lots of restructuring, mostly suggested by Bill Bumgarner. Main
Jack Jansen <jack.jansen@cwi.nl>
parents: 24447
diff changeset
24 settings = NULL;
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
25 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
26 return self;
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
27 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
28
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
29 - (NSString *)windowNibName
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
30 {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
31 // Override returning the nib file name of the document
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
32 // If you need to use a subclass of NSWindowController or if your document supports multiple NSWindowControllers, you should remove this method and override -makeWindowControllers instead.
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
33 return @"MyDocument";
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
34 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
35
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
36 - (void)close
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
37 {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
38 NSApplication *app = [NSApplication sharedApplication];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
39 [super close];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
40 if ([[app delegate] shouldTerminate])
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
41 [app terminate: self];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
42 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
43
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
44 - (void)load_defaults
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
45 {
26398
a0d752be5577 Lots of restructuring, mostly suggested by Bill Bumgarner. Main
Jack Jansen <jack.jansen@cwi.nl>
parents: 24447
diff changeset
46 // if (settings) [settings release];
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
47 settings = [FileSettings newSettingsForFileType: filetype];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
48 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
49
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
50 - (void)update_display
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
51 {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
52 // [[self window] setTitle: script];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
53
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
54 [interpreter setStringValue: [settings interpreter]];
27913
cdb1abc1b409 Optionally honour #! paths in scripts. Fixes #676358.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26398
diff changeset
55 [honourhashbang setState: [settings honourhashbang]];
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
56 [debug setState: [settings debug]];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
57 [verbose setState: [settings verbose]];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
58 [inspect setState: [settings inspect]];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
59 [optimize setState: [settings optimize]];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
60 [nosite setState: [settings nosite]];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
61 [tabs setState: [settings tabs]];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
62 [others setStringValue: [settings others]];
29570
1aa9057c38b4 Added a field that allows the user to set sys.argv-style arguments
Jack Jansen <jack.jansen@cwi.nl>
parents: 27913
diff changeset
63 [scriptargs setStringValue: [settings scriptargs]];
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
64 [with_terminal setState: [settings with_terminal]];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
65
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
66 [commandline setStringValue: [settings commandLineForScript: script]];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
67 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
68
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
69 - (void)update_settings
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
70 {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
71 [settings updateFromSource: self];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
72 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
73
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
74 - (BOOL)run
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
75 {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
76 const char *cmdline;
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
77 int sts;
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
78
24447
ddd6ff0693c4 Implemented starting Python in a terminal window. The implementation isn't
Jack Jansen <jack.jansen@cwi.nl>
parents: 24426
diff changeset
79 cmdline = [[settings commandLineForScript: script] cString];
ddd6ff0693c4 Implemented starting Python in a terminal window. The implementation isn't
Jack Jansen <jack.jansen@cwi.nl>
parents: 24426
diff changeset
80 if ([settings with_terminal]) {
ddd6ff0693c4 Implemented starting Python in a terminal window. The implementation isn't
Jack Jansen <jack.jansen@cwi.nl>
parents: 24426
diff changeset
81 sts = doscript(cmdline);
ddd6ff0693c4 Implemented starting Python in a terminal window. The implementation isn't
Jack Jansen <jack.jansen@cwi.nl>
parents: 24426
diff changeset
82 } else {
ddd6ff0693c4 Implemented starting Python in a terminal window. The implementation isn't
Jack Jansen <jack.jansen@cwi.nl>
parents: 24426
diff changeset
83 sts = system(cmdline);
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
84 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
85 if (sts) {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
86 NSLog(@"Exit status: %d\n", sts);
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
87 return NO;
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
88 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
89 return YES;
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
90 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
91
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
92 - (void)windowControllerDidLoadNib:(NSWindowController *) aController
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
93 {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
94 [super windowControllerDidLoadNib:aController];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
95 // Add any code here that need to be executed once the windowController has loaded the document's window.
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
96 [self load_defaults];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
97 [self update_display];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
98 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
99
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
100 - (NSData *)dataRepresentationOfType:(NSString *)aType
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
101 {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
102 // Insert code here to write your document from the given data. You can also choose to override -fileWrapperRepresentationOfType: or -writeToFile:ofType: instead.
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
103 return nil;
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
104 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
105
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
106 - (BOOL)readFromFile:(NSString *)fileName ofType:(NSString *)type;
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
107 {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
108 // Insert code here to read your document from the given data. You can also choose to override -loadFileWrapperRepresentation:ofType: or -readFromFile:ofType: instead.
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
109 BOOL show_ui;
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
110
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
111 // ask the app delegate whether we should show the UI or not.
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
112 show_ui = [[[NSApplication sharedApplication] delegate] shouldShowUI];
26398
a0d752be5577 Lots of restructuring, mostly suggested by Bill Bumgarner. Main
Jack Jansen <jack.jansen@cwi.nl>
parents: 24447
diff changeset
113 [script release];
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
114 script = [fileName retain];
26398
a0d752be5577 Lots of restructuring, mostly suggested by Bill Bumgarner. Main
Jack Jansen <jack.jansen@cwi.nl>
parents: 24447
diff changeset
115 [filetype release];
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
116 filetype = [type retain];
26398
a0d752be5577 Lots of restructuring, mostly suggested by Bill Bumgarner. Main
Jack Jansen <jack.jansen@cwi.nl>
parents: 24447
diff changeset
117 // if (settings) [settings release];
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
118 settings = [FileSettings newSettingsForFileType: filetype];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
119 if (show_ui) {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
120 [self update_display];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
121 return YES;
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
122 } else {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
123 [self run];
46629
3f84e6ae36da Fix for #1905: PythonLauncher not working correctly on OSX 10.5/Leopard
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38644
diff changeset
124 [self performSelector:@selector(close) withObject:nil afterDelay:0.0];
3f84e6ae36da Fix for #1905: PythonLauncher not working correctly on OSX 10.5/Leopard
Ronald Oussoren <ronaldoussoren@mac.com>
parents: 38644
diff changeset
125 return YES;
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
126 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
127 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
128
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
129 - (IBAction)do_run:(id)sender
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
130 {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
131 [self update_settings];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
132 [self update_display];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
133 if ([self run])
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
134 [self close];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
135 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
136
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
137 - (IBAction)do_cancel:(id)sender
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
138 {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
139 [self close];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
140 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
141
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
142
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
143 - (IBAction)do_reset:(id)sender
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
144 {
26398
a0d752be5577 Lots of restructuring, mostly suggested by Bill Bumgarner. Main
Jack Jansen <jack.jansen@cwi.nl>
parents: 24447
diff changeset
145 [settings reset];
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
146 [self update_display];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
147 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
148
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
149 - (IBAction)do_apply:(id)sender
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
150 {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
151 [self update_settings];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
152 [self update_display];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
153 }
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
154
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
155 // FileSettingsSource protocol
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
156 - (NSString *) interpreter { return [interpreter stringValue];};
27913
cdb1abc1b409 Optionally honour #! paths in scripts. Fixes #676358.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26398
diff changeset
157 - (BOOL) honourhashbang { return [honourhashbang state];};
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
158 - (BOOL) debug { return [debug state];};
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
159 - (BOOL) verbose { return [verbose state];};
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
160 - (BOOL) inspect { return [inspect state];};
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
161 - (BOOL) optimize { return [optimize state];};
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
162 - (BOOL) nosite { return [nosite state];};
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
163 - (BOOL) tabs { return [tabs state];};
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
164 - (NSString *) others { return [others stringValue];};
29570
1aa9057c38b4 Added a field that allows the user to set sys.argv-style arguments
Jack Jansen <jack.jansen@cwi.nl>
parents: 27913
diff changeset
165 - (NSString *) scriptargs { return [scriptargs stringValue];};
24426
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
166 - (BOOL) with_terminal { return [with_terminal state];};
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
167
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
168 // Delegates
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
169 - (void)controlTextDidChange:(NSNotification *)aNotification
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
170 {
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
171 [self update_settings];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
172 [self update_display];
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
173 };
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
174
9afac0dd6b6e First stab at the launcher application. This will be run when the user
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
175 @end