Re: observeValueForKeyPath:ofObject:change:context: called twice
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