Index: trunk/Cocoa/F-Script Anywhere/Source/FSAController.m
===================================================================
--- trunk/Cocoa/F-Script Anywhere/Source/FSAController.m	(revision 7)
+++ trunk/Cocoa/F-Script Anywhere/Source/FSAController.m	(revision 14)
@@ -28,4 +28,5 @@
 #import "FSAViewAssociationController.h"
 #import "FSAnywhere.h"
+#import <FScript/FSInterpreter.h>
 
 @class ShellView;
@@ -36,5 +37,5 @@
 @end
 
-@interface FSInterpreterView (Private)
+@interface FSInterpreterView (FSAWorkaround)
 - (CLIView *)cliView;
 @end
@@ -93,15 +94,16 @@
         }
         if (insertIntoMenu) {
-            NSMenu *fsaMenu = [[NSMenu allocWithZone:[NSMenu menuZone]] initWithTitle:NSLocalizedStringFromTableInBundle(@"FSA", @"FSA", bundle, @"Title of F-Script Anywhere menu")];
-
-            item = [insertIntoMenu insertItemWithTitle:NSLocalizedStringFromTableInBundle(@"FSA", @"FSA", bundle, @"Title of F-Script Anywhere menu") action:NULL keyEquivalent:@"" atIndex:insertLoc];
+            NSMenu *fsaMenu = [[NSMenu allocWithZone: [NSMenu menuZone]] initWithTitle:NSLocalizedStringFromTableInBundle(@"FSA", @"FSA", bundle, @"Title of F-Script Anywhere menu")];
+
+            item = [insertIntoMenu insertItemWithTitle: NSLocalizedStringFromTableInBundle(@"FSA", @"FSA", bundle, @"Title of F-Script Anywhere menu") action:NULL keyEquivalent:@"" atIndex:insertLoc];
             [insertIntoMenu setSubmenu:fsaMenu forItem:item];
             [fsaMenu release];
 
             // Add the items for the commands.
-            item = [fsaMenu addItemWithTitle:NSLocalizedStringFromTableInBundle(@"New F-Script Workspace", @"FSA", bundle, @"Title of F-Script Workspace menu item") action:@selector(createInterpreterWindow:) keyEquivalent:@""];
+            item = [fsaMenu addItemWithTitle: NSLocalizedStringFromTableInBundle(@"New F-Script Workspace", @"FSA", bundle, @"Title of F-Script Workspace menu item") action:@selector(createInterpreterWindow:) keyEquivalent: @""];
             [item setTarget: self];
+            [fsaMenu addItemWithTitle: NSLocalizedStringFromTableInBundle(@"Associate With Interface", @"FSA", bundle, @"Title of Associate with Interface menu item") action: @selector(FSA_associateWithInterface:) keyEquivalent: @""];
             [fsaMenu addItem: [NSMenuItem separatorItem]];
-            item = [fsaMenu addItemWithTitle:NSLocalizedStringFromTableInBundle(@"About F-Script AnywhereÉ", @"FSA", bundle, @"Title of Info Panel menu item") action:@selector(showInfo:) keyEquivalent:@""];
+            item = [fsaMenu addItemWithTitle: NSLocalizedStringFromTableInBundle(@"About F-Script AnywhereÉ", @"FSA", bundle, @"Title of Info Panel menu item") action:@selector(showInfo:) keyEquivalent: @""];
             [item setTarget: self];
         }
@@ -160,4 +162,7 @@
 #warning this should go away when F-Script properly accepts firstResponder on the InterpreterView
         [window makeFirstResponder: (NSView *)[[[self interpreterView] cliView] shellView]];
+        system = [[[self interpreterView] interpreter] objectForIdentifier: @"sys" found: NULL];
+        [system retain];
+        NSAssert1([system isKindOfClass: [System class]], @"Initial value bound to identifier 'sys' is not a System object, but %@", system);
     }
     
@@ -165,4 +170,10 @@
 }
 
+- (void)dealloc;
+{
+    [system release];
+    [super dealloc];
+}
+
 - (FSInterpreterView *)interpreterView;
 {
@@ -170,4 +181,9 @@
 }
 
+- (System *)system;
+{
+    return system;
+}
+
 - (IBAction)setFloating:(id)sender;
 {
@@ -175,14 +191,10 @@
 }
 
-- (IBAction)associateInterface:(id)sender;
-{
-    FSALog(@"associating interface");
+- (IBAction)FSA_associateWithInterface:(id)sender;
+{
     NS_DURING
-        FSALog(@"controller?");
         if (viewAssociationController == nil) {
-            NSLog(@"creating controller");
-            viewAssociationController = [[FSAViewAssociationController alloc] initWithInterpreter: [interpreterView interpreter]];
-        }
-        FSALog(@"got controller %@", viewAssociationController);
+            viewAssociationController = [[FSAViewAssociationController alloc] initWithFSAController: self];
+        }
         [viewAssociationController showWindow: self];
     NS_HANDLER
