Skip navigation.
 
mlTwo NSPopUpButtonCells Binding Question
FROM : Kam Dahin
DATE : Mon Aug 14 22:16:54 2006

Hi all,

I have a NSTableView with a couple columns that contain 
NSPopUpButtonCells.

What I want to do is have the Selection in the first (or left most) 
NSPopUpButtonCell change the contents of the second 
NSPopupButtonCell.  This seemed like it would be an easy thing to do, 
but I can't seem to get it working.  I am using Bindings to try to 
make this happen, and I have things sorta working, but can't seem to 
get that last piece of the puzzle.

Here is a breakdown of what I am doing -- since I am using Interface 
builder and bindings, there isn't a lot of code to show --

I have a model object called "Packs" that contains a mutableArray 
called "Sets" of another model called "MySets".

I have a ArrayController that manages the "Packs" model object and 
displays the correct items in the first NSPopupButtonCell.

I have a another ArrayController that manages the "MySets" model and 
has its "contentArray" binding set to the "selection" of the first 
ArrayController's "Sets" array.

I have my NSPopupButtonCells "content" and "contentValues" bound to 
the classes that the two ArrayControllers are managing and when I run 
my app, I am seeing the proper values displayed in the first PopUpCell.

The Second PopUpCell shows me the correct values for first 
ArrayControllers selected object, but when i change the value in the 
first PopUpCell to some other item, the second PopUpCell never is 
updated with the correct values.

I have searched online for help, but haven't found anyone else with 
this same/similar issue.  If someone has an idea of what I am doing 
wrong, or where I can look for additional help, other than the Cocoa 
Bindings guide which I have been through a number of times, it would 
be much appreciated.

Regards,

k

Related mailsAuthorDate
mlTwo NSPopUpButtonCells Binding Question Kam Dahin Aug 14, 22:16
mlnewbie : cocoa bindings - dot separated key path question joe OneNinetyTwo Aug 14, 23:51
mlRe: newbie : cocoa bindings - dot separated key path question Matt Neuburg Aug 16, 18:51
mlRe: newbie : cocoa bindings - dot separated key path question joe OneNinetyTwo Aug 17, 02:34