Reading unknown class from NSKeyedUnarchiver
Reading unknown class from NSKeyedUnarchiver
- Subject: Reading unknown class from NSKeyedUnarchiver
- From: Adrian Ruigrok <email@hidden>
- Date: Tue, 7 Mar 2006 12:42:40 -0800
Hi all,
Has anyone solved the problem of reading a class from an
NSKeyedUnarchiver for which you do not have the code?
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.
But I can't find a way to overload decodeObjectForKey to substitute a
stand in that can maintain the private data of the plug-in view.
There is no way I can find to enumerate the keys stored in the
object. I have not found way to get the object as a straight block of
bytes. It strikes me as an obvious thing to take care of in
unarchiver:cannotDecodeObjectOfClassName:originalClasses, but I
cannot find any practical examples of how one would implement this.
TIA,
Adrian
_______________________________________________
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