Re: How to save a Dictionary Network to a plist file?
Re: How to save a Dictionary Network to a plist file?
- Subject: Re: How to save a Dictionary Network to a plist file?
- From: Alex Zavatone <email@hidden>
- Date: Sun, 24 Jan 2016 14:01:57 -0500
On Jan 24, 2016, at 1:51 PM, Jens Alfke <email@hidden> wrote:
>
>> On Jan 24, 2016, at 7:12 AM, Dave <email@hidden> wrote:
>>
>> And it would synthesize the initWithCoder, encodeWithCoder and copyWithZone methods.
>
> It would be nice, but the compiler doesn’t always have enough information to do this:
>
> * Some instance variables are transient and shouldn’t be archived.
> * Some aren’t an archivable type (e.g. a C struct, C++ class, or a pointer to such) and need to be transformed before being archived (and after being unarchived.)
> * Sometimes the object needs to do extra initialization after loading the instance variables.
>
> That said, it’d be neat to have a little tool that would read your class’s source code and spit out some basic source code for those methods, which you could then paste in and fix up.
Yeah, as long as it’s an NSObject type and it’s in the class, we should be able to automatically get the property type of class and automatically create the archiver and dearchiver.
Writing this stuff manually every time seems stupid for the base cases.
> —Jens (who’s written at least three object persistence systems in his career… :)
> _______________________________________________
>
> 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
_______________________________________________
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