How to populate NSPopupButton from CoreData in NSTableView based view

I use view-based NSTableViews that are populated using bindings and array controllers with master data. Everything works fine - cells with text and buttons and cells with image and text - I can also edit text, etc.

What I can’t understand and searched everywhere is to fill in a pop-up menu. There are two array controllers, one for the table view and one for the popup button menu items.

I tried to bind the popup menu to the classic way: by linking the contents (ordered objects with the Place entity), the content value (ordered Objects Place.name) and the selected object (Cell Cell View object Value.places.name.

Should all controls work like regular controls in a table view? The menu is not filled. However, if the tableView element already has a value / relationship, the value is displayed correctly.

Any help would be super. Thanks Dan

+4
source share
2 answers

I think there is a mistake here, I ran into the same problem. Here is my job:

Instead of attaching the popup button directly to the array controller in IB, I put the output (named arrayController) in my nib file owner in NSArrayControllerand linked the popup button as follows:

settings

+5
source

All Articles