Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Chris Hanson
To summarize what you've done: 1. You set up a Pages NSArrayController. 2. You set up a Masters NSArrayController. 3. You bind the pop-up's Content Values to the Masters controller's "arrangedObjects.name". 4. You bind the pop-up's Selected Value to the Pages controller's "selection.master" p

Use named constants, not literal strings (was Re: Please help. At wit's end binding NSPopupButtonCell selection)

2008-11-04 Thread Chris Hanson
On Nov 4, 2008, at 1:05 AM, Ken Tozier wrote: Here's how I'm setting up the bindings 1. bind an NSArrayController (pageController ) to an NSArray of pages in a project [pageController bind: @"contentArray" toObject: inProject withKeyPath: @"pages" options: nil]; One tip that has nothing

Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Ken Tozier
Success! Here's the correct incantation 1. bind page controller to page list [pageController bind: @"contentArray" toObject: inProject withKeyPath: @"pages" options: nil]; 2. bind popup controller to master page list [popupController bind: @"contentArray" toObject: inProject withKeyPath

Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Cathy Shive
On Nov 4, 2008, at 1:27 PM, Ken Tozier wrote: The reason I think this might be possible through bindings, is that other bound fields in the table have values specific to their associated page. For example, pages also have a status string, indicating whether stories need trims, are missing p

Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Ken Tozier
On Nov 4, 2008, at 7:07 AM, Cathy Shive wrote: As for whether or not it's possible to do this with bindings, I'm not 100% sure... When the table is first displayed, are the proper selections displayed for each row? Yes and no. The popups have all the correct choices in them but all pag

Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Cathy Shive
The 'anIndex' in my snippet is just nothing - you'd have to determine that. I guess it would be something like the selected object index of the array controller you're binding the popup's content to? As for whether or not it's possible to do this with bindings, I'm not 100% sure... When

Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Ken Tozier
Hmmm. So there's no way to set this up just through bindings? Also, in your snippet, where does "anIndex" come from? On Nov 4, 2008, at 5:32 AM, Cathy Shive wrote: On Nov 4, 2008, at 10:05 AM, Ken Tozier wrote: What happens is that when I choose an item in one row's popup cell, the selectio

Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Cathy Shive
On Nov 4, 2008, at 10:05 AM, Ken Tozier wrote: What happens is that when I choose an item in one row's popup cell, the selection in every popup in the entire table changes to the new selection. Don't forget that there is only one NSPopUpButtonCell per column. If you change it's selection

Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Ken Tozier
Hi I've been reading and re-reading the Apple master detail documentation for two days now, googling, etc and can't to get the selection in an NSPopUpButtonCell to work correctly. I've tried every permutation of binding I could think up without success. What happens is that when I choose