Missed userInfo keys.
[enjoyable.git] / Classes / NJOutputController.m
index cbb48f7..0bb335f 100644 (file)
             selector:@selector(mappingListDidChange:)
             name:NJEventMappingListChanged
             object:nil];
+        [NSNotificationCenter.defaultCenter
+             addObserver:self
+             selector:@selector(mappingDidChange:)
+             name:NJEventMappingChanged
+             object:nil];
     }
     return self;
 }
 }
 
 - (void)mappingListDidChange:(NSNotification *)note {
-    NSArray *mappings = note.object;
+    NSArray *mappings = note.userInfo[NJMappingListKey];
     NJMapping *current = mappingPopup.selectedItem.representedObject;
     [mappingPopup.menu removeAllItems];
     for (NJMapping *mapping in mappings) {
     [mappingPopup selectItemWithRepresentedObject:current];
 }
 
+- (void)mappingDidChange:(NSNotification *)note {
+    [self loadCurrent];
+}
+
 @end