Ignore:
Timestamp:
10/20/02 04:41:17 (22 years ago)
Author:
Nicholas Riley
Message:

F-Script Anywhere 1.1.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/F-Script Anywhere/Source/FSAController.m

    r7 r14  
    2828#import "FSAViewAssociationController.h"
    2929#import "FSAnywhere.h"
     30#import <FScript/FSInterpreter.h>
    3031
    3132@class ShellView;
     
    3637@end
    3738
    38 @interface FSInterpreterView (Private)
     39@interface FSInterpreterView (FSAWorkaround)
    3940- (CLIView *)cliView;
    4041@end
     
    9394        }
    9495        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];
    9899            [insertIntoMenu setSubmenu:fsaMenu forItem:item];
    99100            [fsaMenu release];
    100101
    101102            // 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: @""];
    103104            [item setTarget: self];
     105            [fsaMenu addItemWithTitle: NSLocalizedStringFromTableInBundle(@"Associate With Interface", @"FSA", bundle, @"Title of Associate with Interface menu item") action: @selector(FSA_associateWithInterface:) keyEquivalent: @""];
    104106            [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: @""];
    106108            [item setTarget: self];
    107109        }
     
    160162#warning this should go away when F-Script properly accepts firstResponder on the InterpreterView
    161163        [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);
    162167    }
    163168   
     
    165170}
    166171
     172- (void)dealloc;
     173{
     174    [system release];
     175    [super dealloc];
     176}
     177
    167178- (FSInterpreterView *)interpreterView;
    168179{
     
    170181}
    171182
     183- (System *)system;
     184{
     185    return system;
     186}
     187
    172188- (IBAction)setFloating:(id)sender;
    173189{
     
    175191}
    176192
    177 - (IBAction)associateInterface:(id)sender;
    178 {
    179     FSALog(@"associating interface");
     193- (IBAction)FSA_associateWithInterface:(id)sender;
     194{
    180195    NS_DURING
    181         FSALog(@"controller?");
    182196        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        }
    187199        [viewAssociationController showWindow: self];
    188200    NS_HANDLER
Note: See TracChangeset for help on using the changeset viewer.