Skip navigation.
 
mlNSPopupButtonCell in NSTableView
FROM : beinstein
DATE : Mon Jul 10 20:28:03 2006

Hi:

I have a table with a bunch of various controls in different columns: checkboxes, segmented controls, etc and one column with a popupbutton. All cells behave normally except for the popupbutton, which, for some reason I can't use selectItemWithTitle/Index/Tag. I can dynamically load items into the popup, my tableView:setObjectValue:forTableColumn:row method correct reports the index of the selected item, but I just can't display the selection after it's been clicked, nor can I programmatically select a value. I've done a bunch of searching, and there seem to be a whole bunch of ways to do it (ie adding a NSMenu, etc), but I can't stand those kinds of solutions. I feel like this should work without a problem? Something I'm doing wrong or can you really not use selectItemWithTitle in tableView?

On a side note, it seems that there is only one cell in a given popup, as the error I get when using an int index of anything other than 0 is: "invalid parameter not satisfying: (index >= 0) && (index <(_itemArray ? CFArrayGetCount((CFArrayRef)_itemArray) : 0", meaning of course that 0 is the only index. I feel like this is correct, but I can't quite recall from my Hillegass days. Any help would be greatly appreciated.

Thanks in advance,
Ben

Related mailsAuthorDate
No related mails found.