Im trying to get the selected index of a NSComboBox that has a datasource by using indexOfSelectedItem.
[combobox setUsesDataSource:YES];
[combobox setDataSource:dataSource];
[combobox selectItemAtIndex:1];
int idx =[combobox indexOfSelectedItem];
idx will always returns -1;
Getting the same results even when defining a internal list for the NSComboBox in InterfaceBuilder.
Is there any other way to retrieve the selected index?