Output view controller now has a delegate rather than a direct reference to the input...
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Wed, 20 Mar 2013 20:39:13 +0000 (21:39 +0100)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Wed, 20 Mar 2013 20:39:13 +0000 (21:39 +0100)
Classes/EnjoyableApplicationDelegate.h
Classes/EnjoyableApplicationDelegate.m
Classes/NJOutputMapping.m
Classes/NJOutputViewController.h
Classes/NJOutputViewController.m
Info.plist
Resources/English.lproj/MainMenu.xib

index d9408aa..0207036 100644 (file)
                                                     NJInputControllerDelegate,
                                                     NJDeviceViewControllerDelegate,
                                                     NJMappingsViewControllerDelegate,
+                                                    NJOutputViewControllerDelegate,
                                                     NJMappingMenuDelegate,
                                                     NSWindowDelegate>
 
-@property (nonatomic, strong) IBOutlet NJInputController *inputController;
-@property (nonatomic, strong) IBOutlet NJOutputViewController *outputController;
+@property (nonatomic, strong) IBOutlet NJInputController *ic;
+@property (nonatomic, strong) IBOutlet NJOutputViewController *oc;
 @property (nonatomic, strong) IBOutlet NJMappingsViewController *mvc;
 @property (nonatomic, strong) IBOutlet NJDeviceViewController *dvc;
 
index 83d0771..beab960 100644 (file)
@@ -20,7 +20,7 @@
 - (void)didSwitchApplication:(NSNotification *)note {
     NSRunningApplication *activeApp = note.userInfo[NSWorkspaceApplicationKey];
     if (activeApp)
-        [self.inputController activateMappingForProcess:activeApp];
+        [self.ic activateMappingForProcess:activeApp];
 }
 
 - (void)applicationWillFinishLaunching:(NSNotification *)notification {
         name:NJEventSimulationStopped
         object:nil];
 
-    [self.inputController load];
+    [self.ic load];
     [self.mvc.mappingList reloadData];
     [self.mvc changedActiveMappingToIndex:
-     [self.inputController indexOfMapping:
-      self.inputController.currentMapping]];
+     [self.ic indexOfMapping:
+      self.ic.currentMapping]];
 
     statusItem = [NSStatusBar.systemStatusBar statusItemWithLength:36];
     statusItem.image = [NSImage imageNamed:@"Status Menu Icon Disabled"];
             [self performSelector:@selector(flashStatusItem)
                        withObject:self
                        afterDelay:0.2 * i];
+    [self loadOutputForInput:self.dvc.selectedHandler];
 }
 
 - (NSMenu *)applicationDockMenu:(NSApplication *)sender {
     NSURL *URL = [NSURL fileURLWithPath:filename];
     NJMapping *mapping = [NJMapping mappingWithContentsOfURL:URL
                                                        error:&error];
-    if ([[self.inputController mappingForKey:mapping.name] hasConflictWith:mapping]) {
-        [self promptForMapping:mapping atIndex:self.inputController.mappings.count];
-    } else if ([self.inputController  mappingForKey:mapping.name]) {
-        [[self.inputController mappingForKey:mapping.name] mergeEntriesFrom:mapping];
+    if ([[self.ic mappingForKey:mapping.name] hasConflictWith:mapping]) {
+        [self promptForMapping:mapping atIndex:self.ic.mappings.count];
+    } else if ([self.ic  mappingForKey:mapping.name]) {
+        [[self.ic mappingForKey:mapping.name] mergeEntriesFrom:mapping];
     } else if (mapping) {
         [self.mvc beginUpdates];
-        [self.inputController addMapping:mapping];
-        [self.mvc addedMappingAtIndex:self.inputController.mappings.count - 1 startEditing:NO];
+        [self.ic addMapping:mapping];
+        [self.mvc addedMappingAtIndex:self.ic.mappings.count - 1 startEditing:NO];
         [self.mvc endUpdates];
-        [self.inputController activateMapping:mapping];
+        [self.ic activateMapping:mapping];
     } else {
         [self.window presentError:error
                    modalForWindow:self.window
 }
 
 - (void)mappingWasChosen:(NJMapping *)mapping {
-    [self.inputController activateMapping:mapping];
+    [self.ic activateMapping:mapping];
 }
 
 - (void)mappingListShouldOpen {
                       NSError *error;
                       NJMapping *mapping = [NJMapping mappingWithContentsOfURL:panel.URL
                                                                          error:&error];
-                      if ([[self.inputController mappingForKey:mapping.name] hasConflictWith:mapping]) {
-                          [self promptForMapping:mapping atIndex:self.inputController.mappings.count];
-                      } else if ([self.inputController mappingForKey:mapping.name]) {
-                          [[self.inputController mappingForKey:mapping.name] mergeEntriesFrom:mapping];
+                      if ([[self.ic mappingForKey:mapping.name] hasConflictWith:mapping]) {
+                          [self promptForMapping:mapping atIndex:self.ic.mappings.count];
+                      } else if ([self.ic mappingForKey:mapping.name]) {
+                          [[self.ic mappingForKey:mapping.name] mergeEntriesFrom:mapping];
                       } else if (mapping) {
-                          [self.inputController addMapping:mapping];
+                          [self.ic addMapping:mapping];
                       } else {
                           [self.window presentError:error
                                      modalForWindow:self.window
 - (void)exportMappingClicked:(id)sender {
     NSSavePanel *panel = [NSSavePanel savePanel];
     panel.allowedFileTypes = @[ @"enjoyable" ];
-    NJMapping *mapping = self.inputController.currentMapping;
+    NJMapping *mapping = self.ic.currentMapping;
     panel.nameFieldStringValue = [mapping.name stringByFixingPathComponent];
     [panel beginSheetModalForWindow:self.window
                   completionHandler:^(NSInteger result) {
     [alert.window orderOut:nil];
     switch (returnCode) {
         case NSAlertFirstButtonReturn: // Merge
-            [self.inputController mergeMapping:newMapping intoMapping:oldMapping];
-            [self.inputController activateMapping:oldMapping];
+            [self.ic mergeMapping:newMapping intoMapping:oldMapping];
+            [self.ic activateMapping:oldMapping];
             break;
         case NSAlertThirdButtonReturn: // New Mapping
             [self.mvc beginUpdates];
-            [self.inputController addMapping:newMapping];
+            [self.ic addMapping:newMapping];
             [self.mvc addedMappingAtIndex:idx startEditing:YES];
             [self.mvc endUpdates];
-            [self.inputController activateMapping:newMapping];
+            [self.ic activateMapping:newMapping];
             break;
         default: // Cancel, other.
             break;
 }
 
 - (void)promptForMapping:(NJMapping *)mapping atIndex:(NSInteger)idx {
-    NJMapping *mergeInto = [self.inputController mappingForKey:mapping.name];
+    NJMapping *mergeInto = [self.ic mappingForKey:mapping.name];
     NSAlert *conflictAlert = [[NSAlert alloc] init];
     conflictAlert.messageText = NSLocalizedString(@"import conflict prompt", @"Title of import conflict alert");
     conflictAlert.informativeText =
 }
 
 - (NSInteger)numberOfMappings:(NJMappingsViewController *)mvc {
-    return self.inputController.mappings.count;
+    return self.ic.mappings.count;
 }
 
 - (NJMapping *)mappingsViewController:(NJMappingsViewController *)mvc
                       mappingForIndex:(NSUInteger)idx {
-    return self.inputController.mappings[idx];
+    return self.ic.mappings[idx];
 }
 
 - (void)mappingsViewController:(NJMappingsViewController *)mvc
           renameMappingAtIndex:(NSInteger)index
                         toName:(NSString *)name {
-    [self.inputController renameMapping:self.inputController.mappings[index]
+    [self.ic renameMapping:self.ic.mappings[index]
                                         to:name];
 }
 
        canMoveMappingFromIndex:(NSInteger)fromIdx
                        toIndex:(NSInteger)toIdx {
     return fromIdx != toIdx && fromIdx != 0 && toIdx != 0
-            && toIdx < (NSInteger)self.inputController.mappings.count;
+            && toIdx < (NSInteger)self.ic.mappings.count;
 }
 
 - (void)mappingsViewController:(NJMappingsViewController *)mvc
                        toIndex:(NSInteger)toIdx {
     [mvc beginUpdates];
     [mvc.mappingList moveRowAtIndex:fromIdx toIndex:toIdx];
-    [self.inputController moveMoveMappingFromIndex:fromIdx toIndex:toIdx];
+    [self.ic moveMoveMappingFromIndex:fromIdx toIndex:toIdx];
     [mvc endUpdates];
 }
 
           removeMappingAtIndex:(NSInteger)idx {
     [mvc beginUpdates];
     [mvc removedMappingAtIndex:idx];
-    [self.inputController removeMappingAtIndex:idx];
+    [self.ic removeMappingAtIndex:idx];
     [mvc endUpdates];
 }
 
                          error:(NSError **)error {
     NJMapping *mapping = [NJMapping mappingWithContentsOfURL:url
                                                        error:error];
-    if ([[self.inputController mappingForKey:mapping.name] hasConflictWith:mapping]) {
+    if ([[self.ic mappingForKey:mapping.name] hasConflictWith:mapping]) {
         [self promptForMapping:mapping atIndex:index];
-    } else if ([self.inputController mappingForKey:mapping.name]) {
-        [[self.inputController mappingForKey:mapping.name] mergeEntriesFrom:mapping];
+    } else if ([self.ic mappingForKey:mapping.name]) {
+        [[self.ic mappingForKey:mapping.name] mergeEntriesFrom:mapping];
     } else if (mapping) {
         [self.mvc beginUpdates];
         [self.mvc addedMappingAtIndex:index startEditing:NO];
-        [self.inputController insertMapping:mapping atIndex:index];
+        [self.ic insertMapping:mapping atIndex:index];
         [self.mvc endUpdates];
     }
     return !!mapping;
 - (void)mappingsViewController:(NJMappingsViewController *)mvc
                     addMapping:(NJMapping *)mapping {
     [mvc beginUpdates];
-    [mvc addedMappingAtIndex:self.inputController.mappings.count startEditing:YES];
-    [self.inputController addMapping:mapping];
+    [mvc addedMappingAtIndex:self.ic.mappings.count startEditing:YES];
+    [self.ic addMapping:mapping];
     [mvc endUpdates];
-    [self.inputController activateMapping:mapping];
+    [self.ic activateMapping:mapping];
 }
 
 - (void)mappingsViewController:(NJMappingsViewController *)mvc
            choseMappingAtIndex:(NSInteger)idx {
-    [self.inputController activateMapping:self.inputController.mappings[idx]];
+    [self.ic activateMapping:self.ic.mappings[idx]];
 }
 
 - (id)deviceViewController:(NJDeviceViewController *)dvc
              elementForUID:(NSString *)uid {
-    return [self.inputController elementForUID:uid];
+    return [self.ic elementForUID:uid];
+}
+
+- (void)loadOutputForInput:(NJInput *)input {
+    NJOutput *output = self.ic.currentMapping[input];
+    [self.oc loadOutput:output forInput:input];
 }
 
 - (void)deviceViewControllerDidSelectNothing:(NJDeviceViewController *)dvc {
-    [self.outputController loadInput:dvc.selectedHandler];
+    [self loadOutputForInput:nil];
 }
 
 - (void)deviceViewController:(NJDeviceViewController *)dvc
              didSelectBranch:(NJInputPathElement *)handler {
-    [self.outputController loadInput:dvc.selectedHandler];
+    [self loadOutputForInput:dvc.selectedHandler];
 }
 
 - (void)deviceViewController:(NJDeviceViewController *)dvc
             didSelectHandler:(NJInputPathElement *)handler {
-    [self.outputController loadInput:dvc.selectedHandler];
+    [self loadOutputForInput:dvc.selectedHandler];
 }
 
 - (void)deviceViewController:(NJDeviceViewController *)dvc
              didSelectDevice:(NJInputPathElement *)device {
-    [self.outputController loadInput:dvc.selectedHandler];
+    [self loadOutputForInput:dvc.selectedHandler];
 }
 
 - (void)inputController:(NJInputController *)ic
 
 - (void)inputController:(NJInputController *)ic didInput:(NJInput *)input {
     [self.dvc expandAndSelectItem:input];
-    [self.outputController loadInput:input];
-    [self.outputController focusKey];
+    [self loadOutputForInput:input];
+    [self.oc focusKey];
 }
 
 - (void)inputController:(NJInputController *)ic didError:(NSError *)error {
 }
 
 - (NSInteger)numberOfDevicesInDeviceList:(NJDeviceViewController *)dvc {
-    return self.inputController.devices.count;
+    return self.ic.devices.count;
 }
 
 - (NJDevice *)deviceViewController:(NJDeviceViewController *)dvc
                     deviceForIndex:(NSUInteger)idx {
-    return self.inputController.devices[idx];
+    return self.ic.devices[idx];
 }
 
 - (IBAction)simulatingEventsChanged:(NSButton *)sender {
-    self.inputController.simulatingEvents = sender.state == NSOnState;
+    self.ic.simulatingEvents = sender.state == NSOnState;
+}
+
+- (void)outputViewController:(NJOutputViewController *)ovc
+                   setOutput:(NJOutput *)output
+                    forInput:(NJInput *)input {
+    self.ic.currentMapping[input] = output;
+    [self.ic save];
+}
+
+- (NJMapping *)outputViewController:(NJOutputViewController *)ovc
+                    mappingForIndex:(NSUInteger)index {
+    return self.ic.mappings[index];
 }
 
 @end
index cfcc34f..2ee6a84 100644 (file)
@@ -33,7 +33,7 @@
 - (void)trigger {
     EnjoyableApplicationDelegate *ctrl = (EnjoyableApplicationDelegate *)NSApplication.sharedApplication.delegate;
     if (_mapping) {
-        [ctrl.inputController activateMapping:_mapping];
+        [ctrl.ic activateMapping:_mapping];
         self.mappingName = _mapping.name;
     } else {
         // TODO: Show an error message? Unobtrusively since something
index 2f50ef8..a35c735 100644 (file)
@@ -8,9 +8,11 @@
 
 #import "NJKeyInputField.h"
 
-@class NJInputController;
-@class NJOutput;
 @class NJInput;
+@class NJOutput;
+@class NJMapping;
+
+@protocol NJOutputViewControllerDelegate;
 
 @interface NJOutputViewController : NSObject <NJKeyInputFieldDelegate> {
     IBOutlet NJKeyInputField *keyInput;
     IBOutlet NSSlider *scrollSpeedSlider;
     IBOutlet NSTextField *title;
     IBOutlet NSPopUpButton *mappingPopup;
-    IBOutlet NJInputController *inputController;
     IBOutlet NSButton *smoothCheck;
     IBOutlet NSButton *unknownMapping;
 }
 
-@property (assign) BOOL enabled;
+@property (nonatomic, weak) IBOutlet id <NJOutputViewControllerDelegate> delegate;
+
+- (void)loadOutput:(NJOutput *)output forInput:(NJInput *)input;
+- (void)focusKey;
 
-- (void)loadInput:(NJInput *)input;
 - (IBAction)radioChanged:(id)sender;
 - (IBAction)mdirChanged:(id)sender;
 - (IBAction)mbtnChanged:(id)sender;
 - (IBAction)scrollSpeedChanged:(id)sender;
 - (IBAction)scrollTypeChanged:(id)sender;
 
-- (void)focusKey;
+@end
+
+@protocol NJOutputViewControllerDelegate
+
+- (NJMapping *)outputViewController:(NJOutputViewController *)ovc
+                    mappingForIndex:(NSUInteger)index;
+- (void)outputViewController:(NJOutputViewController *)ovc
+                   setOutput:(NJOutput *)output
+                    forInput:(NJInput *)input;
 
 @end
index a0f356f..ee5d260 100644 (file)
             selector:@selector(mappingListDidChange:)
             name:NJEventMappingListChanged
             object:nil];
-        [NSNotificationCenter.defaultCenter
-             addObserver:self
-             selector:@selector(mappingDidChange:)
-             name:NJEventMappingChanged
-             object:nil];
     }
     return self;
 }
     [self commit];
 }
 
-- (NJOutput *)currentOutput {
-    return inputController.currentMapping[_input];
-}
-
 - (NJOutput *)makeOutput {
     switch (radioButtons.selectedRow) {
         case 0:
             break;
         case 2: {
             NJOutputMapping *c = [[NJOutputMapping alloc] init];
-            c.mapping = inputController.mappings[mappingPopup.indexOfSelectedItem];
+            c.mapping = [self.delegate outputViewController:self
+                                            mappingForIndex:mappingPopup.indexOfSelectedItem];
             return c;
         }
         case 3: {
 
 - (void)commit {
     [self cleanUpInterface];
-    inputController.currentMapping[_input] = [self makeOutput];
-    [inputController save];
+    [self.delegate outputViewController:self
+                              setOutput:[self makeOutput]
+                               forInput:_input];
 }
 
 - (BOOL)enabled {
 }
 
 - (void)loadOutput:(NJOutput *)output forInput:(NJInput *)input {
+    _input = input;
     if (!input) {
-        self.enabled = NO;
+        [self setEnabled:NO];
         title.stringValue = @"";
     } else {
-        self.enabled = YES;
+        [self setEnabled:YES];
         NSString *inpFullName = input.name;
         for (NJInputPathElement *cur = input.parent; cur; cur = cur.parent) {
             inpFullName = [[NSString alloc] initWithFormat:@"%@ ▸ %@", cur.name, inpFullName];
     [self cleanUpInterface];
 }
 
-- (void)loadInput:(NJInput *)input {
-    _input = input;
-    [self loadOutput:self.currentOutput forInput:input];
-}
-
 - (void)focusKey {
     if (radioButtons.selectedRow <= 1)
         [keyInput.window makeFirstResponder:keyInput];
     [mappingPopup selectItemWithIdenticalRepresentedObject:current];
 }
 
-- (void)mappingDidChange:(NSNotification *)note {
-    [self loadInput:_input];
-}
-
 @end
index 93dd01a..8ad8cc0 100644 (file)
@@ -46,7 +46,7 @@
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>565</string>
+       <string>571</string>
        <key>LSApplicationCategoryType</key>
        <string>public.app-category.utilities</string>
        <key>NSHumanReadableCopyright</key>
index 44865f4..15e852a 100644 (file)
@@ -1728,14 +1728,6 @@ aW5nLg</string>
                                        </object>
                                        <int key="connectionID">1025</int>
                                </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBOutletConnection" key="connection">
-                                               <string key="label">outputController</string>
-                                               <reference key="source" ref="207406104"/>
-                                               <reference key="destination" ref="801536542"/>
-                                       </object>
-                                       <int key="connectionID">1027</int>
-                               </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBActionConnection" key="connection">
                                                <string key="label">simulatingEventsChanged:</string>
@@ -1754,11 +1746,19 @@ aW5nLg</string>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBOutletConnection" key="connection">
-                                               <string key="label">inputController</string>
+                                               <string key="label">ic</string>
                                                <reference key="source" ref="207406104"/>
                                                <reference key="destination" ref="1007832501"/>
                                        </object>
-                                       <int key="connectionID">1032</int>
+                                       <int key="connectionID">1036</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">oc</string>
+                                               <reference key="source" ref="207406104"/>
+                                               <reference key="destination" ref="801536542"/>
+                                       </object>
+                                       <int key="connectionID">1037</int>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBActionConnection" key="connection">
@@ -1930,11 +1930,11 @@ aW5nLg</string>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBOutletConnection" key="connection">
-                                               <string key="label">inputController</string>
+                                               <string key="label">delegate</string>
                                                <reference key="source" ref="801536542"/>
-                                               <reference key="destination" ref="1007832501"/>
+                                               <reference key="destination" ref="207406104"/>
                                        </object>
-                                       <int key="connectionID">1034</int>
+                                       <int key="connectionID">1035</int>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBOutletConnection" key="connection">
@@ -3309,402 +3309,9 @@ aW5nLg</string>
                        <nil key="activeLocalization"/>
                        <dictionary class="NSMutableDictionary" key="localizations"/>
                        <nil key="sourceID"/>
-                       <int key="maxID">1034</int>
-               </object>
-               <object class="IBClassDescriber" key="IBDocument.Classes">
-                       <array class="NSMutableArray" key="referencedPartialClassDescriptions">
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">EnjoyableApplicationDelegate</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <dictionary class="NSMutableDictionary" key="actions">
-                                               <string key="exportMappingClicked:">id</string>
-                                               <string key="importMappingClicked:">id</string>
-                                               <string key="restoreToForeground:">id</string>
-                                               <string key="simulatingEventsChanged:">NSButton</string>
-                                       </dictionary>
-                                       <dictionary class="NSMutableDictionary" key="actionInfosByName">
-                                               <object class="IBActionInfo" key="exportMappingClicked:">
-                                                       <string key="name">exportMappingClicked:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBActionInfo" key="importMappingClicked:">
-                                                       <string key="name">importMappingClicked:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBActionInfo" key="restoreToForeground:">
-                                                       <string key="name">restoreToForeground:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBActionInfo" key="simulatingEventsChanged:">
-                                                       <string key="name">simulatingEventsChanged:</string>
-                                                       <string key="candidateClassName">NSButton</string>
-                                               </object>
-                                       </dictionary>
-                                       <dictionary class="NSMutableDictionary" key="outlets">
-                                               <string key="dockMenu">NSMenu</string>
-                                               <string key="dvc">NJDeviceViewController</string>
-                                               <string key="inputController">NJInputController</string>
-                                               <string key="mvc">NJMappingsViewController</string>
-                                               <string key="outputController">NJOutputController</string>
-                                               <string key="simulatingEventsButton">NSButton</string>
-                                               <string key="statusItemMenu">NSMenu</string>
-                                               <string key="window">NSWindow</string>
-                                       </dictionary>
-                                       <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <object class="IBToOneOutletInfo" key="dockMenu">
-                                                       <string key="name">dockMenu</string>
-                                                       <string key="candidateClassName">NSMenu</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="dvc">
-                                                       <string key="name">dvc</string>
-                                                       <string key="candidateClassName">NJDeviceViewController</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="inputController">
-                                                       <string key="name">inputController</string>
-                                                       <string key="candidateClassName">NJInputController</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="mvc">
-                                                       <string key="name">mvc</string>
-                                                       <string key="candidateClassName">NJMappingsViewController</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="outputController">
-                                                       <string key="name">outputController</string>
-                                                       <string key="candidateClassName">NJOutputController</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="simulatingEventsButton">
-                                                       <string key="name">simulatingEventsButton</string>
-                                                       <string key="candidateClassName">NSButton</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="statusItemMenu">
-                                                       <string key="name">statusItemMenu</string>
-                                                       <string key="candidateClassName">NSMenu</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="window">
-                                                       <string key="name">window</string>
-                                                       <string key="candidateClassName">NSWindow</string>
-                                               </object>
-                                       </dictionary>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/EnjoyableApplicationDelegate.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NJDeviceViewController</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <dictionary class="NSMutableDictionary" key="outlets">
-                                               <string key="delegate">id</string>
-                                               <string key="hidStoppedNotice">NSView</string>
-                                               <string key="inputsTree">NSOutlineView</string>
-                                               <string key="noDevicesNotice">NSView</string>
-                                       </dictionary>
-                                       <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <object class="IBToOneOutletInfo" key="delegate">
-                                                       <string key="name">delegate</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="hidStoppedNotice">
-                                                       <string key="name">hidStoppedNotice</string>
-                                                       <string key="candidateClassName">NSView</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="inputsTree">
-                                                       <string key="name">inputsTree</string>
-                                                       <string key="candidateClassName">NSOutlineView</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="noDevicesNotice">
-                                                       <string key="name">noDevicesNotice</string>
-                                                       <string key="candidateClassName">NSView</string>
-                                               </object>
-                                       </dictionary>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/NJDeviceViewController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NJInputController</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <object class="NSMutableDictionary" key="outlets">
-                                               <string key="NS.key.0">delegate</string>
-                                               <string key="NS.object.0">id</string>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <string key="NS.key.0">delegate</string>
-                                               <object class="IBToOneOutletInfo" key="NS.object.0">
-                                                       <string key="name">delegate</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/NJInputController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NJKeyInputField</string>
-                                       <string key="superclassName">NSControl</string>
-                                       <object class="NSMutableDictionary" key="outlets">
-                                               <string key="NS.key.0">delegate</string>
-                                               <string key="NS.object.0">id</string>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <string key="NS.key.0">delegate</string>
-                                               <object class="IBToOneOutletInfo" key="NS.object.0">
-                                                       <string key="name">delegate</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/NJKeyInputField.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NJMappingMenuController</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <dictionary class="NSMutableDictionary" key="outlets">
-                                               <string key="delegate">id</string>
-                                               <string key="eventSimulationToggle">NSMenuItem</string>
-                                               <string key="menu">NSMenu</string>
-                                       </dictionary>
-                                       <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <object class="IBToOneOutletInfo" key="delegate">
-                                                       <string key="name">delegate</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="eventSimulationToggle">
-                                                       <string key="name">eventSimulationToggle</string>
-                                                       <string key="candidateClassName">NSMenuItem</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="menu">
-                                                       <string key="name">menu</string>
-                                                       <string key="candidateClassName">NSMenu</string>
-                                               </object>
-                                       </dictionary>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/NJMappingMenuController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NJMappingsViewController</string>
-                                       <string key="superclassName">NSViewController</string>
-                                       <dictionary class="NSMutableDictionary" key="actions">
-                                               <string key="addClicked:">id</string>
-                                               <string key="mappingTriggerClicked:">id</string>
-                                               <string key="moveDownClicked:">id</string>
-                                               <string key="moveUpClicked:">id</string>
-                                               <string key="removeClicked:">id</string>
-                                       </dictionary>
-                                       <dictionary class="NSMutableDictionary" key="actionInfosByName">
-                                               <object class="IBActionInfo" key="addClicked:">
-                                                       <string key="name">addClicked:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBActionInfo" key="mappingTriggerClicked:">
-                                                       <string key="name">mappingTriggerClicked:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBActionInfo" key="moveDownClicked:">
-                                                       <string key="name">moveDownClicked:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBActionInfo" key="moveUpClicked:">
-                                                       <string key="name">moveUpClicked:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBActionInfo" key="removeClicked:">
-                                                       <string key="name">removeClicked:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                       </dictionary>
-                                       <dictionary class="NSMutableDictionary" key="outlets">
-                                               <string key="delegate">id</string>
-                                               <string key="mappingList">NSTableView</string>
-                                               <string key="mappingListPopover">NSPopover</string>
-                                               <string key="mappingListTrigger">NSButton</string>
-                                               <string key="moveDown">NSButton</string>
-                                               <string key="moveUp">NSButton</string>
-                                               <string key="removeMapping">NSButton</string>
-                                       </dictionary>
-                                       <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <object class="IBToOneOutletInfo" key="delegate">
-                                                       <string key="name">delegate</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="mappingList">
-                                                       <string key="name">mappingList</string>
-                                                       <string key="candidateClassName">NSTableView</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="mappingListPopover">
-                                                       <string key="name">mappingListPopover</string>
-                                                       <string key="candidateClassName">NSPopover</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="mappingListTrigger">
-                                                       <string key="name">mappingListTrigger</string>
-                                                       <string key="candidateClassName">NSButton</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="moveDown">
-                                                       <string key="name">moveDown</string>
-                                                       <string key="candidateClassName">NSButton</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="moveUp">
-                                                       <string key="name">moveUp</string>
-                                                       <string key="candidateClassName">NSButton</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="removeMapping">
-                                                       <string key="name">removeMapping</string>
-                                                       <string key="candidateClassName">NSButton</string>
-                                               </object>
-                                       </dictionary>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/NJMappingsViewController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">NJOutputController</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <dictionary class="NSMutableDictionary" key="actions">
-                                               <string key="mbtnChanged:">id</string>
-                                               <string key="mdirChanged:">id</string>
-                                               <string key="mouseSpeedChanged:">id</string>
-                                               <string key="radioChanged:">id</string>
-                                               <string key="scrollSpeedChanged:">id</string>
-                                               <string key="scrollTypeChanged:">id</string>
-                                               <string key="sdirChanged:">id</string>
-                                       </dictionary>
-                                       <dictionary class="NSMutableDictionary" key="actionInfosByName">
-                                               <object class="IBActionInfo" key="mbtnChanged:">
-                                                       <string key="name">mbtnChanged:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBActionInfo" key="mdirChanged:">
-                                                       <string key="name">mdirChanged:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBActionInfo" key="mouseSpeedChanged:">
-                                                       <string key="name">mouseSpeedChanged:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBActionInfo" key="radioChanged:">
-                                                       <string key="name">radioChanged:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBActionInfo" key="scrollSpeedChanged:">
-                                                       <string key="name">scrollSpeedChanged:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBActionInfo" key="scrollTypeChanged:">
-                                                       <string key="name">scrollTypeChanged:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                               <object class="IBActionInfo" key="sdirChanged:">
-                                                       <string key="name">sdirChanged:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                       </dictionary>
-                                       <dictionary class="NSMutableDictionary" key="outlets">
-                                               <string key="inputController">NJInputController</string>
-                                               <string key="keyInput">NJKeyInputField</string>
-                                               <string key="mappingPopup">NSPopUpButton</string>
-                                               <string key="mouseBtnSelect">NSSegmentedControl</string>
-                                               <string key="mouseDirSelect">NSSegmentedControl</string>
-                                               <string key="mouseSpeedSlider">NSSlider</string>
-                                               <string key="radioButtons">NSMatrix</string>
-                                               <string key="scrollDirSelect">NSSegmentedControl</string>
-                                               <string key="scrollSpeedSlider">NSSlider</string>
-                                               <string key="smoothCheck">NSButton</string>
-                                               <string key="title">NSTextField</string>
-                                               <string key="unknownMapping">NSButton</string>
-                                       </dictionary>
-                                       <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <object class="IBToOneOutletInfo" key="inputController">
-                                                       <string key="name">inputController</string>
-                                                       <string key="candidateClassName">NJInputController</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="keyInput">
-                                                       <string key="name">keyInput</string>
-                                                       <string key="candidateClassName">NJKeyInputField</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="mappingPopup">
-                                                       <string key="name">mappingPopup</string>
-                                                       <string key="candidateClassName">NSPopUpButton</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="mouseBtnSelect">
-                                                       <string key="name">mouseBtnSelect</string>
-                                                       <string key="candidateClassName">NSSegmentedControl</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="mouseDirSelect">
-                                                       <string key="name">mouseDirSelect</string>
-                                                       <string key="candidateClassName">NSSegmentedControl</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="mouseSpeedSlider">
-                                                       <string key="name">mouseSpeedSlider</string>
-                                                       <string key="candidateClassName">NSSlider</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="radioButtons">
-                                                       <string key="name">radioButtons</string>
-                                                       <string key="candidateClassName">NSMatrix</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="scrollDirSelect">
-                                                       <string key="name">scrollDirSelect</string>
-                                                       <string key="candidateClassName">NSSegmentedControl</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="scrollSpeedSlider">
-                                                       <string key="name">scrollSpeedSlider</string>
-                                                       <string key="candidateClassName">NSSlider</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="smoothCheck">
-                                                       <string key="name">smoothCheck</string>
-                                                       <string key="candidateClassName">NSButton</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="title">
-                                                       <string key="name">title</string>
-                                                       <string key="candidateClassName">NSTextField</string>
-                                               </object>
-                                               <object class="IBToOneOutletInfo" key="unknownMapping">
-                                                       <string key="name">unknownMapping</string>
-                                                       <string key="candidateClassName">NSButton</string>
-                                               </object>
-                                       </dictionary>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/NJOutputController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">SUUpdater</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <object class="NSMutableDictionary" key="actions">
-                                               <string key="NS.key.0">checkForUpdates:</string>
-                                               <string key="NS.object.0">id</string>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="actionInfosByName">
-                                               <string key="NS.key.0">checkForUpdates:</string>
-                                               <object class="IBActionInfo" key="NS.object.0">
-                                                       <string key="name">checkForUpdates:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="outlets">
-                                               <string key="NS.key.0">delegate</string>
-                                               <string key="NS.object.0">id</string>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <string key="NS.key.0">delegate</string>
-                                               <object class="IBToOneOutletInfo" key="NS.object.0">
-                                                       <string key="name">delegate</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/SUUpdater.h</string>
-                                       </object>
-                               </object>
-                       </array>
+                       <int key="maxID">1037</int>
                </object>
+               <object class="IBClassDescriber" key="IBDocument.Classes"/>
                <int key="IBDocument.localizationMode">0</int>
                <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
                <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>