cocoabindingmaster-detailnspopupbuttoncell

Problem with NSPopupButtonCell bindings


I'm trying to achieve something similar to the Apple Master-Detail pop-up cell example but the bindings don't seem to be working for me.

My app allows users to build up a stageplay; so I have a table view of acts. Each act can have a list of lines so the acts table view drives a second table view of lines (so selecting act one updates the lines table view with the lines of that act).

This setup seems to be working fine.

Each line is of course spoken by a character, so my document object has a list of characters as well as a list of acts. What I want is a pop-up cell in my lines table with values taken from the characters array.

So I followed the steps in that Apple tutorial but it doesn't work...

It seems like the contentValues binding is the broken one. What am I doing wrong?

Here are my bindings: enter image description here


Solution

  • I discovered what the problem was - I had bindings set on the NSTableView as well as the Table column and the NSPopupButtonCell which was causing strange things to happen.

    My conclusion is now that any table bindings not on the table column are WRONG