Re: Does initWithCoder re-create observers made with addObserver?
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