Re: Reading unknown class from NSKeyedUnarchiver
Re: Reading unknown class from NSKeyedUnarchiver
- Subject: Re: Reading unknown class from NSKeyedUnarchiver
- From: Mike Blaguszewski <email@hidden>
- Date: Tue, 7 Mar 2006 16:57:51 -0500
On Mar 7, 2006, at 3:42 PM, Adrian Ruigrok wrote:
We support 3rd party plug-ins, and it is quite possible at runtime
that we are reading an NSView subclass without having the plug-in
loaded. I want to be able to read the data from the unknown class,
and ferret that data away so that when I write out my views I can
re-save it to my document and then at a later time if the document
is opened with the plug-in loaded everything will still be there.
Maybe I'm missing something, but couldn't you add a level of
indirection here? Archive the plugin-dependent data into an NSData
object, then archive that into the rest of your object graph. That
way, it really is a bundle of bits unless you take the step of
explicitly unpacking it. But it won't prevent you from unarchiving
anything else. I think the NSCoding protocol is probably flexible
enough to do this pretty transparently.
--
Mike Blaguszewski / Ambrosia Software, Inc.
_______________________________________________
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