Have device controller setup itself rather than relying on the application delegate...
[enjoyable.git] / Classes / NJDeviceController.m
index 8417927..5a6603c 100644 (file)
     if ((self = [super init])) {
         _devices = [[NSMutableArray alloc] initWithCapacity:16];
         _continousOutputs = [[NSMutableArray alloc] initWithCapacity:32];
     if ((self = [super init])) {
         _devices = [[NSMutableArray alloc] initWithCapacity:16];
         _continousOutputs = [[NSMutableArray alloc] initWithCapacity:32];
+        [NSNotificationCenter.defaultCenter
+            addObserver:self
+            selector:@selector(setup)
+            name:NSApplicationDidFinishLaunchingNotification
+            object:nil];
     }
     return self;
 }
     }
     return self;
 }