• 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: How to get observe KVO changes to *every* key for an object?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get observe KVO changes to *every* key for an object?


  • Subject: Re: How to get observe KVO changes to *every* key for an object?
  • From: Sherm Pendley <email@hidden>
  • Date: Sat, 14 May 2005 02:18:44 -0400

On May 14, 2005, at 12:37 AM, Dan Wood - Discussion Lists wrote:

I have a class with lots of properties that are modified with an inspector using bindings. I need to observe changes to *all* of the keys to have my view refresh itself (in a non-bindings way).

Would a dependent key work for you? Like this:

+(void) initialize {
[self setKeys: [NSArray arrayWithObjects: @"foo", @"bar", @"baz", nil]
triggerChangeNotificationsForDependentKey: @"somethingChanged"];
}


Then connect your observer to the "somethingChanged" property. Because "somethingChanged" is dependent on "foo", "bar", and "baz", the observer will be notified when any of those are changed.

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to get observe KVO changes to *every* key for an object?
      • From: Dan Wood - Discussion Lists <email@hidden>
References: 
 >How to get observe KVO changes to *every* key for an object? (From: Dan Wood - Discussion Lists <email@hidden>)

  • Prev by Date: Re: FSCopyObjectAsync: useless and crippled
  • Next by Date: Lazy evaluation of items in NSPredicates
  • Previous by thread: How to get observe KVO changes to *every* key for an object?
  • Next by thread: Re: How to get observe KVO changes to *every* key for an object?
  • Index(es):
    • Date
    • Thread