Type references to the application delegate to prevent warnings.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Tue, 26 Feb 2013 16:45:38 +0000 (17:45 +0100)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Tue, 26 Feb 2013 16:45:38 +0000 (17:45 +0100)
ConfigsController.m
JoystickController.m
TargetConfig.m

index 43c92d33b65fa6722e380e413740aa60eaeb1b31..01bd0d38023764b4f2762ac37d9ee2cfc85395b0 100644 (file)
@@ -48,7 +48,7 @@
        currentConfig = config;
        [removeButton setEnabled: ![config protect]];
        [targetController load];
-       [[[NSApplication sharedApplication] delegate] configChanged];
+       [(ApplicationController *)[[NSApplication sharedApplication] delegate] configChanged];
        [tableView selectRow: [configs indexOfObject: config] byExtendingSelection: NO];
 }
 
@@ -56,7 +56,7 @@
        Config* newConfig = [[Config alloc] init];
        [newConfig setName: @"untitled"];
        [configs addObject: newConfig];
-       [[[NSApplication sharedApplication] delegate] configsChanged];
+       [(ApplicationController *)[[NSApplication sharedApplication] delegate] configsChanged];
        [tableView reloadData];
        [tableView selectRow: ([configs count]-1) byExtendingSelection: NO];
        [tableView editColumn: 0 row:([configs count]-1) withEvent:nil select:YES];
@@ -78,7 +78,7 @@
                                [entries removeObjectForKey: key];
                }
        }
-       [[[NSApplication sharedApplication] delegate] configsChanged];
+       [(ApplicationController *)[[NSApplication sharedApplication] delegate] configsChanged];
        
        [tableView reloadData];
 }
@@ -99,7 +99,7 @@
        [(Config*)[configs objectAtIndex: index] setName: newName];
        [targetController refreshConfigsPreservingSelection:YES];
        [tableView reloadData];
-       [[[NSApplication sharedApplication] delegate] configsChanged];
+       [(ApplicationController *)[[NSApplication sharedApplication] delegate] configsChanged];
 }
 
 -(int)numberOfRowsInTableView: (NSTableView*)table {
        configs = newConfigs;
        [tableView reloadData];
        currentConfig = NULL;
-       [[[NSApplication sharedApplication] delegate] configsChanged];
+       [(ApplicationController *)[[NSApplication sharedApplication] delegate] configsChanged];
        
        int index = [[envelope objectForKey: @"selectedIndex"] intValue];
        [self activateConfig: [configs objectAtIndex:index] forApplication: NULL];
index 15512956eb64ef04eeeb26eba2ce878be1a95e29..1bf5b4384b16d4ccb560fcd3e72f13e1526ca8d8 100644 (file)
@@ -65,7 +65,7 @@ void input_callback(void* inContext, IOReturn inResult, void* inSender, IOHIDVal
        IOHIDDeviceRef device = IOHIDQueueGetDevice((IOHIDQueueRef) inSender);
        
        Joystick* js = [self findJoystickByRef: device];
-       if([[[NSApplication sharedApplication] delegate] active]) {
+       if([(ApplicationController *)[[NSApplication sharedApplication] delegate] active]) {
                // for reals
                JSAction* mainAction = [js actionForEvent: value];
                if(!mainAction)
index 73d45633274291d58ddf068f916972be082d7494..dae77866b6ba7a8777718a82cd7c70d71ea6fbcf 100644 (file)
@@ -30,7 +30,7 @@
 }
 
 -(void) trigger {
-       [[[[NSApplication sharedApplication] delegate] configsController] activateConfig:config forApplication: NULL];
+       [[(ApplicationController *)[[NSApplication sharedApplication] delegate] configsController] activateConfig:config forApplication: NULL];
 }
 
 @end