Subclassing and Archiving/Unarchiving
Subclassing and Archiving/Unarchiving
- Subject: Subclassing and Archiving/Unarchiving
- From: Dave <email@hidden>
- Date: Sun, 25 Sep 2016 11:12:04 +0100
Hi All,
I have an App that produces Archives files that are loaded by another App. The Classes that get archived are in a set of common files that both Apps share.
During the build process I need to carry extra information that only the writer app knows about. My first instinct was to create a subclasses in the writer App for each Class I need the “extra” information, but of course this won’t work because the App that loads the files won’t know about the subclasses.
I was thinking of putting a wrapper around these classes but it is quite ugly compared to subclassing. The other thing I could do is to builder a new base class from the subclass that mean a lot of deep copying.
Is there any way that I can get the archiver to just select the Base Class and ignore the extra properties in the Subclass? Or is there a better way of doing this?
All the Best
Dave
_______________________________________________
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