0

I am trying to bind a NSPopUpButton in a view based NSTableView with NSArrayContollers using Xcode 8.1. I have an macOS app that had been using a cell based NSTableView and I would like to convert it to a view based table, however, I have been completely unsuccessful in doing this. I have looked at all the various wed postings, but nothing seems to work for me. I have been working on this for over two days.

Here is my design: accountArrayController is bound to the larger table and this all seems to work just fine. patientArrayController is aNSMutableArray of NSString's that contains the list of patients to be populated in the menu items of the NSPopUpButton.

Here are the actual bindings for the NSPopUpButton

enter image description here

enter image description here

enter image description here

enter image description here

I am guessing that the problem is in the Content Values bindings, I have tried many variations. When I compile this, I get

.../xxx.storyboard: Exception while running ibtool: *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil

However, when I try other variations, Xcode (really ibtool) hangs for a long time and then exits with an error code of 255.

How can I resolve this? I'm happy to provide other binding information and code blocks, if needed.

Brian
  • 14,610
  • 7
  • 35
  • 43
user1092808
  • 283
  • 4
  • 12

1 Answers1

-1

The model attribute name you used in the NSTableColumn bind, you want to also use in the Table Cell View bind - 3rd level down from table column. It should have filled in already 'objectValue' or 'selection' or 'arrangedObjects', just add . and you should be good.

slashlos
  • 913
  • 9
  • 17