• 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: Does initWithCoder re-create observers made with addObserver?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does initWithCoder re-create observers made with addObserver?


  • Subject: Re: Does initWithCoder re-create observers made with addObserver?
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 3 Dec 2009 11:28:39 -0800

On Dec 3, 2009, at 09:21, David Hirsch wrote:

> I'm trying to track down a bug.  The subject says it all:  If I've created an observer programatically, then saved both the observed and observer objects with encodeObject:forKey:, will decodeObjectForKey recreate that observer for me, or do I need to do it myself?

No, you have to do it yourself.

Incidentally, I assume you're talking about the observation -- the term "observer" generally means the observing object. *That* object gets recreated by unarchiving, of course, but the observation (set up with 'addObserver:forKeyPath"...') isn't persistent.


_______________________________________________

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

References: 
 >Does initWithCoder re-create observers made with addObserver? (From: David Hirsch <email@hidden>)

  • Prev by Date: Question about aliasing (analog clock hands)
  • Next by Date: Re: Question about aliasing (analog clock hands)
  • Previous by thread: Does initWithCoder re-create observers made with addObserver?
  • Next by thread: Text insertion point not blinking
  • Index(es):
    • Date
    • Thread