NSTableView Popup Button

I am trying to use a pop-up button in an NSTableView, I would like to populate the values ​​for the pop-up with the "Sectors" array controller. I can make this work fine if the popup is within the normal view, however it appears blank inside the Tableview. Links for the popup button below

Popup bindings

Objects

I searched around and it seems that other people had this problem but could not find a viable solution.

+4
source share
1 answer

I had the same problem and I just posted the answer to this similar question

NSTableView-based NSPopupButton: Getting Bindings to Work

You can get it working, and I posted a sample project on GitHub that demonstrates the difference in the bindings needed for it to work inside a view-based NSTableView, compared to what you usually expect to do.

Basically, you need to create an IBOutlet for your array controller in a class that is a table view delegate, and then bind to it.

+1
source

Source: https://habr.com/ru/post/1479442/


All Articles