Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best design pattern for un-archiving instances of shared resources?



Am 19.10.2007 um 02:06 schrieb Barry Wark:
So, question for the gurus:
Is there a better pattern for solving the problems I've outlined
above, particularly one that doesn't require a similar hack for every
subclass?

Did you check whether NSUnarchiver and NSArchiver have any useful methods? The NSArchiverCallback informal protocol for NSObject sounds like it could solve your problem or alleviate it a bit. It seems to allow providing a different object to archive in place of the current object.


NSUnarchiver also has -replaceObject:withObject:, which looks like it's the opposite.

I hope that hasn't been mentioned yet, I haven't yet managed to go up-thread on this one.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de



_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Best design pattern for un-archiving instances of shared resources? (From: "Barry Wark" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.