• 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: Double binding not possible?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Double binding not possible?


  • Subject: Re: Double binding not possible?
  • From: vincent habchi <email@hidden>
  • Date: Fri, 11 Jun 2010 17:14:13 +0200

Ken,

> Yes, it is impossible.

That's what I thought.

> Those bindings are two-way.  (Not all are, but those are.)  Thus, when the bound-to property changes, so does the view's selection.  Now, how would this work if the view's selection were bound to two different properties?  What if those properties were inconsistent with each other?
>
> Out of curiosity, which two objects were you binding to?  That may suggest a design problem.  Or do you mean two properties of the same object?  Usually, a view binding is bound to a property of a controller.

Roughly, I have two objects: one is a NSDictionaryController whose keys (NSStrings) are bound to the "Content Values" of the popUpButton. The "Selected Value" is bound to some attribute of a result object that collects the values chosen by the user (the PopUp button is part of a larger dialog). At the same time, I'd obviously like the "Selected Index" binding of the NSPopUp to be bound to the selectedIndex property of the NSDictionaryController, but that where it fails.

The easiest solution is to implement an IBAction, that's what I am doing currently.

Thanks a lot,
Vincent_______________________________________________

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

References: 
 >Double binding not possible? (From: vincent habchi <email@hidden>)
 >Re: Double binding not possible? (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Double binding not possible?
  • Next by Date: Re: dataWithPDFInsideRect and NSPrintOperation
  • Previous by thread: Re: Double binding not possible?
  • Next by thread: zoom question
  • Index(es):
    • Date
    • Thread