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

Re: observeValueForKeyPath:ofObject:change:context: called twice


  • Subject: Re: observeValueForKeyPath:ofObject:change:context: called twice
  • From: Christian Schneider <email@hidden>
  • Date: Mon, 13 Jun 2005 17:44:08 +0200

Found it, must not call willChangeValueForKey/didChangeValueForKey in
method that is kvc compliant.

chris

On 6/13/05, Christian Schneider <email@hidden> wrote:
> 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

References: 
 >observeValueForKeyPath:ofObject:change:context: called twice (From: Christian Schneider <email@hidden>)

  • Prev by Date: Re: Warning: critical Core Data documentation flaw
  • Next by Date: Re: Warning: critical Core Data documentation flaw
  • Previous by thread: observeValueForKeyPath:ofObject:change:context: called twice
  • Next by thread: Keyboard modifiers on buttons
  • Index(es):
    • Date
    • Thread