• 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
Please help. At wit's end binding NSPopupButtonCell selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Please help. At wit's end binding NSPopupButtonCell selection


  • Subject: Please help. At wit's end binding NSPopupButtonCell selection
  • From: Ken Tozier <email@hidden>
  • Date: Tue, 4 Nov 2008 04:05:53 -0500

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 an item in one row's popup cell, the selection in every popup in the entire table changes to the new selection.

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];


2. bind an NSArrayController (popupController ) to an NSArray of master page types that can be applied to a page
[popupController bind: @"contentArray" toObject: inProject withKeyPath: @"masters" options: nil];


3. bind array of popup menu items to a popup menu column
[popupColumn bind: @"contentValues" toObject: popupController withKeyPath: @"arrangedObjects.name" options: nil];


4. bind the popup selection to the "master" page property of the currently selected page
[popupColumn bind: @"selectedValue" toObject: pageController withKeyPath: @"selection.master" options: nil];


I'm pretty certain that steps 1, 2, 3 are correct as the menus do get populated with the correct strings. It's step 4, binding a row's popup selection to the corresponding field in a page object that has eluded all my efforts.

Obviously this kind of thing is possible because Apple (and many other applications) do it all the time, but whatever they are doing, I can't seem to get it working.


Thanks for any help



_______________________________________________

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


  • Follow-Ups:
    • Re: Please help. At wit's end binding NSPopupButtonCell selection
      • From: Chris Hanson <email@hidden>
    • Use named constants, not literal strings (was Re: Please help. At wit's end binding NSPopupButtonCell selection)
      • From: Chris Hanson <email@hidden>
    • Re: Please help. At wit's end binding NSPopupButtonCell selection
      • From: Cathy Shive <email@hidden>
  • Prev by Date: Underlining text in Interface Builder
  • Next by Date: CALayer contents memory leak
  • Previous by thread: Re: Underlining text in Interface Builder
  • Next by thread: Re: Please help. At wit's end binding NSPopupButtonCell selection
  • Index(es):
    • Date
    • Thread