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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to