• 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
Updating bound controls with selection change
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Updating bound controls with selection change


  • Subject: Updating bound controls with selection change
  • From: Ari Benzane <email@hidden>
  • Date: Wed, 22 Aug 2007 13:41:04 +0100 (BST)

I have a bindings/KVO question that's driving me nuts. I have an inspector panel with a host of controls bound to the values of the currently 'selected' object in the document. Only one object can be selected at a time. When the selection changes, I want the bound controls to reflect the new selection, but they don't get notified because I'm not calling the KVO accessors. Currently I've got code like this that's called when the selection changes:

[SelectedObject setValueA: [SelectedObject valueA]];
[SelectedObject setValueB: [SelectedObject valueB]];

This updates the controls in a round-about way but it's a mess. Is they're an easier way? I've read Apple's Bindings and KVO docs but they only cover the simple cases.

Thanks for any help - sorry if this strikes you as a noob question!

---------------------------------
 For ideas on reducing your carbon footprint visit Yahoo! For Good this month.
_______________________________________________

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: Updating bound controls with selection change
      • From: mmalc crawford <email@hidden>
  • Prev by Date: Re: Drawing Text with alpha
  • Next by Date: Re: Drawing text with alpha
  • Previous by thread: Re: memory mgmt for NSMutableArray as ivar
  • Next by thread: Re: Updating bound controls with selection change
  • Index(es):
    • Date
    • Thread