Re: KVO question
Re: KVO question
- Subject: Re: KVO question
- From: Rainer Standke <email@hidden>
- Date: Thu, 1 Jul 2010 10:30:39 -0700
I have a core data app where I don't necessarily know when managed objects go away, as in: become faults, will be deleted etc.. I also need to add the observer to the managed object in awakeFromFetch, but that gets not only called upon opening an existing object, but also later on when fetches are executed.
I take it the answer to my question is no? As in: No, an object can not ask another if it's being observe by it?
For now I have solved the problem by setting a flag on the managed object when it registers itself for observation.
Rainer
On Jul 1, 2010, at 9:15 , Kyle Sluder wrote:
> On Jul 1, 2010, at 8:26 AM, Rainer Standke <email@hidden> wrote:
>
>> Hello all,
>>
>> is it possible to determine if one object is observing another? Specifically, I'd like one object to ask another "are you observing me?". That way I could determine if I need to remove that observer before I let go of the observed object...
>
> This is a very good indication that you have an inverted or cyclical dependency. Your observee shouldn't need to know about your observers.
>
> What is your specific setup?
>
> --Kyle Sluder
_______________________________________________
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