I have a NSTableView with each cell containing a NSPopUpButtonCell
. I have set the NSPopUpButtonCell
's action to a method that simply checks for the selected index (so that this can be saved and the table reloaded).
thePopUpButtonCell.action = @selector(popUpChangedValue);
-(void)popUpChangedValue {
NSLog(@"%ld", [thePopUpButtonCell indexOfSelectedItem]);
}
No matter what I select, it says that the selected index is 0, even though it is not. Do you know what is causing this?