Changeset 14 for trunk/Cocoa/F-Script Anywhere/Source/FSAController.m
- Timestamp:
- 10/20/02 04:41:17 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/F-Script Anywhere/Source/FSAController.m
r7 r14 28 28 #import "FSAViewAssociationController.h" 29 29 #import "FSAnywhere.h" 30 #import <FScript/FSInterpreter.h> 30 31 31 32 @class ShellView; … … 36 37 @end 37 38 38 @interface FSInterpreterView ( Private)39 @interface FSInterpreterView (FSAWorkaround) 39 40 - (CLIView *)cliView; 40 41 @end … … 93 94 } 94 95 if (insertIntoMenu) { 95 NSMenu *fsaMenu = [[NSMenu allocWithZone: [NSMenu menuZone]] initWithTitle:NSLocalizedStringFromTableInBundle(@"FSA", @"FSA", bundle, @"Title of F-Script Anywhere menu")];96 97 item = [insertIntoMenu insertItemWithTitle: NSLocalizedStringFromTableInBundle(@"FSA", @"FSA", bundle, @"Title of F-Script Anywhere menu") action:NULL keyEquivalent:@"" atIndex:insertLoc];96 NSMenu *fsaMenu = [[NSMenu allocWithZone: [NSMenu menuZone]] initWithTitle:NSLocalizedStringFromTableInBundle(@"FSA", @"FSA", bundle, @"Title of F-Script Anywhere menu")]; 97 98 item = [insertIntoMenu insertItemWithTitle: NSLocalizedStringFromTableInBundle(@"FSA", @"FSA", bundle, @"Title of F-Script Anywhere menu") action:NULL keyEquivalent:@"" atIndex:insertLoc]; 98 99 [insertIntoMenu setSubmenu:fsaMenu forItem:item]; 99 100 [fsaMenu release]; 100 101 101 102 // Add the items for the commands. 102 item = [fsaMenu addItemWithTitle: NSLocalizedStringFromTableInBundle(@"New F-Script Workspace", @"FSA", bundle, @"Title of F-Script Workspace menu item") action:@selector(createInterpreterWindow:) keyEquivalent:@""];103 item = [fsaMenu addItemWithTitle: NSLocalizedStringFromTableInBundle(@"New F-Script Workspace", @"FSA", bundle, @"Title of F-Script Workspace menu item") action:@selector(createInterpreterWindow:) keyEquivalent: @""]; 103 104 [item setTarget: self]; 105 [fsaMenu addItemWithTitle: NSLocalizedStringFromTableInBundle(@"Associate With Interface", @"FSA", bundle, @"Title of Associate with Interface menu item") action: @selector(FSA_associateWithInterface:) keyEquivalent: @""]; 104 106 [fsaMenu addItem: [NSMenuItem separatorItem]]; 105 item = [fsaMenu addItemWithTitle: NSLocalizedStringFromTableInBundle(@"About F-Script AnywhereÉ", @"FSA", bundle, @"Title of Info Panel menu item") action:@selector(showInfo:) keyEquivalent:@""];107 item = [fsaMenu addItemWithTitle: NSLocalizedStringFromTableInBundle(@"About F-Script AnywhereÉ", @"FSA", bundle, @"Title of Info Panel menu item") action:@selector(showInfo:) keyEquivalent: @""]; 106 108 [item setTarget: self]; 107 109 } … … 160 162 #warning this should go away when F-Script properly accepts firstResponder on the InterpreterView 161 163 [window makeFirstResponder: (NSView *)[[[self interpreterView] cliView] shellView]]; 164 system = [[[self interpreterView] interpreter] objectForIdentifier: @"sys" found: NULL]; 165 [system retain]; 166 NSAssert1([system isKindOfClass: [System class]], @"Initial value bound to identifier 'sys' is not a System object, but %@", system); 162 167 } 163 168 … … 165 170 } 166 171 172 - (void)dealloc; 173 { 174 [system release]; 175 [super dealloc]; 176 } 177 167 178 - (FSInterpreterView *)interpreterView; 168 179 { … … 170 181 } 171 182 183 - (System *)system; 184 { 185 return system; 186 } 187 172 188 - (IBAction)setFloating:(id)sender; 173 189 { … … 175 191 } 176 192 177 - (IBAction)associateInterface:(id)sender; 178 { 179 FSALog(@"associating interface"); 193 - (IBAction)FSA_associateWithInterface:(id)sender; 194 { 180 195 NS_DURING 181 FSALog(@"controller?");182 196 if (viewAssociationController == nil) { 183 NSLog(@"creating controller"); 184 viewAssociationController = [[FSAViewAssociationController alloc] initWithInterpreter: [interpreterView interpreter]]; 185 } 186 FSALog(@"got controller %@", viewAssociationController); 197 viewAssociationController = [[FSAViewAssociationController alloc] initWithFSAController: self]; 198 } 187 199 [viewAssociationController showWindow: self]; 188 200 NS_HANDLER
Note:
See TracChangeset
for help on using the changeset viewer.