On Mar 18, 2013, at 16:17 , Graham Cox <graham....@bigpond.com> wrote:
> Because the defaults are stored as a plist, so the objects written there have > to be property list objects. I agree, it's a bit annoying that this isn't > handled transparently. You have to convert those objects to NSData, one way > to do that is to archive them individually and save the archive data as the > object, but anything else that allows them to be described as a plist object > is fine, e.g. a string. It seems like an NSArchiver subclass could call -encodeWithCoder: to create a dictionary that could live in a plist file (as opposed to creating an NSData), and it could easily be used transparently. The advantage to this is twofold: you avoid a couple extra lines in your code each time you access the pref, and the prefs plist is human-readable. -- Rick _______________________________________________ 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