On Jan 24, 2016, at 1:51 PM, Jens Alfke <j...@mooseyard.com> wrote:

> 
>> On Jan 24, 2016, at 7:12 AM, Dave <d...@looktowindward.com> 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 (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to