I believe this may be the case when you can use the object method NSNotificationto get a pointer to the combo box that caused the notification.
For instance:
Assuming you have something like this in your .h file:
@interface MDAppController : NSObject {
IBOutlet NSComboBox *comboBox1;
IBOutlet NSComboBox *comboBox2;
}
@end
In your .m file:
- (void)comboBoxSelectionDidChange:(NSNotification *)notification {
NSComboBox *comboBox = (NSComboBox *)[notification object];
if (comboBox == comboBox1) {
} else if (comboBox == comboBox2) {
}
}
NSGod source
share