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