• 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
Re: NSPopUpButtonCell bindings help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPopUpButtonCell bindings help


  • Subject: Re: NSPopUpButtonCell bindings help
  • From: "Jim Thomason" <email@hidden>
  • Date: Tue, 24 Apr 2007 16:35:39 -0500

You're missing the point here--the "repeats" object must exist in the
content/Objects array (i.e. content array, but contentObjects array instead
if bound). If your test project is made from real code, this will never be
the case. I.e. the "repeats" object must be one of the "val" objects, and
not just equivalent, it must be the exact same object.

No, you're missing the point. The "repeats" object -does- exist in the contentObjects array. They're both NSNumbers, both with the same value, both with the same memory address. It's the same object in both places.

You're right--not always, just in certain cases. However, using your test
project, I get the exact same error when adding an external popupbutton and
binding selectObject to selection.bar. So what you describe above can't be
the case if your test project is an accurate model.

You bound improperly. I apologize for not including an NSPopUpButton in my example, I thought I had. Regardless, I updated with one:

http://www.bassetsoftware.com/osx/popupcelltest.zip

Again, the selectedObject binding needs to be removed on the "Foo As
List" column in the table, but the pop up button is always going to
work. It's bound exactly the same way as the column, just going
through selection instead of arrangedObjects.

Your best bet is likely to have a particular class and arraycontroller to
manage the popup content. The trick then is making sure that every "repeats"
object is matching object from this special class. Throw in a transformer
for the contentValues binding to get the special display that you want.

If there's a way to do this, I still haven't figured it out, and a working example would really be appreciated. I've tried every iteration I can think of to bind only content (and skip contentObjects), and only display via contentValues, but I cannot get it to work.

I'm still convinced it's a bug (and, as said, the bug report has been filed).

-Jim...
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: NSPopUpButtonCell bindings help
      • From: Keary Suska <email@hidden>
References: 
 >Re: NSPopUpButtonCell bindings help (From: "Jim Thomason" <email@hidden>)
 >Re: NSPopUpButtonCell bindings help (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: Changing selection color in NSTextView
  • Next by Date: Re: Changing selection color in NSTextView
  • Previous by thread: Re: NSPopUpButtonCell bindings help
  • Next by thread: Re: NSPopUpButtonCell bindings help
  • Index(es):
    • Date
    • Thread