• 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: KVO question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: KVO question
      • From: "Sean McBride" <email@hidden>
    • Re: KVO question
      • From: Keary Suska <email@hidden>
References: 
 >KVO question (From: Rainer Standke <email@hidden>)
 >Re: KVO question (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: class_respondsToSelector() in runtime.h?
  • Next by Date: Re: Finder-like conversion of a fileURL to 'user-friendly' path
  • Previous by thread: Re: KVO question
  • Next by thread: Re: KVO question
  • Index(es):
    • Date
    • Thread