Nearly have NSPopUpButtonCell working, need help for one binding
Nearly have NSPopUpButtonCell working, need help for one binding
- Subject: Nearly have NSPopUpButtonCell working, need help for one binding
- From: Ken Tozier <email@hidden>
- Date: Sun, 2 Nov 2008 07:28:46 -0500
Hi
I have a table with one column that displays an NSPopUpButtonCell. I
was able to bind the menu items into the cell and can select items in
the menu, but when I change a selection on one row's menu, the menu in
every other row in the table changes to the new selection.
Here's how I'm setting up the bindings, can anyone point out where I'm
messing up?
- (void) setProject:(PMProject *) inProject
{
NSTableColumn *popupColumn = [table tableColumnWithIdentifier:
@"master"];
// bind pageController to project page list
[pageController bind: @"contentArray" toObject: inProject
withKeyPath: @"childNodes" options: nil];
// bind popupController project master page menus
[popupController bind: @"contentArray" toObject: inProject
withKeyPath: @"masters" options: nil];
// bind popup menu column to popupController
[popupColumn bind: @"contentValues" toObject: popupController
withKeyPath: @"arrangedObjects.name" options: nil];
// bind popup column selection to "master" property of selected page
[popupColumn bind: @"selectedValue" toObject: pageController
withKeyPath: @"selection.master" options: nil];
// Also tried the following but unlike previous line, the selectins
don't stick and reverts back to the default
[[pageController selection] bind: @"master" toObject: popupController
withKeyPath: @"arrangedObjects.name" options: nil];
}
Any help greatly appreciated
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden