• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Nearly have NSPopUpButtonCell working, need help for one binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Simple Flipbook Animation?
  • Next by Date: Re: Need help to make this method prettier
  • Previous by thread: Re: Need help to make these methods prettier
  • Next by thread: Re: When and how often do you mix C++ with Objective C in your project?
  • Index(es):
    • Date
    • Thread