Fatso
Fatso

Reputation: 1318

Setting Selected Index of NSPopUpButtonCell in NSTableView

I populate a column in an NSTableView with NSPopUpButtonCell instances (just dragged such a cell to a column in IB). Everything works fine, except for one thing : when I try to set the selected item index of one of the NSPopUpButtonCell instances by returning the appropriate index in -tableView:objectValueForTableColumn:row: the menu still highlights the first item. I checked the value that I return in that method, and it is correct (so it's not always zero).

Am I doing something wrong?

Upvotes: 0

Views: 344

Answers (1)

Fatso
Fatso

Reputation: 1318

I added a call to -selectItemAtIndex: the 'willDisplayCell' delegate method.

Upvotes: 1

Related Questions