• 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
observeValueForKeyPath:ofObject:change:context: called twice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

observeValueForKeyPath:ofObject:change:context: called twice


  • Subject: observeValueForKeyPath:ofObject:change:context: called twice
  • From: Christian Schneider <email@hidden>
  • Date: Mon, 13 Jun 2005 14:45:31 +0200

Hi all,

one of my classes mangages an NSArray and is bound to the array as
well as to the individual objects within the array so that it knows
when they are modified. Changes to an object trigger
observeValueForKeyPath:ofObject:change:context: but unfortunately they
do that twice.

I've double-checked that I don't observe the object twice but couldn't
find anything; I've also tried removing my class after the first call
to observeValue...: in the debugger but only get no notification or
two.

Is there a way to get an object to give me a list of all its observers?

Also, I'm calling addObserver:forKeyPath:options:context: in one class
but have defined observeValueForKeyPath:ofObject:change:context: only
in a category of the original class. Could that be a problem?

Thanks

chris
 _______________________________________________
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: observeValueForKeyPath:ofObject:change:context: called twice
      • From: Christian Schneider <email@hidden>
  • Prev by Date: Re: Stopwatch
  • Next by Date: Keyboard modifiers on buttons
  • Previous by thread: Subject: Re: Base-64 decode (was Property List Editor)
  • Next by thread: Re: observeValueForKeyPath:ofObject:change:context: called twice
  • Index(es):
    • Date
    • Thread