I am using this notification for NSComboBox. Only problem is when I select a different item in the dropdown it always show previously selected value in the combo box. How can I get the currently selected value. I need to make some controls enable/disable based on the value.
- (void)comboBoxSelectionDidChange:(NSNotification *)notification {
NSComboBox *comboBox = (NSComboBox *)[notification object];
NSLog(@"[comboBox stringValue] : %@", [salaryBy stringValue] );
}
I got the selected value using:
NSString *strValue = [comboBox itemObjectValueAtIndex:[comboBox indexOfSelectedItem]];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With