Mailing Lists: Apple Mailing Lists

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

NSCoder and limited file formats



I'd like to subclass NSCoder to make archivers and unarchivers that target a file format that only supports a subset of the data types available in ObjC and certain foundation kit objects under special conditions but does not support encoding arbitrary data. My problem is that Apple's documentation says subclasses must override the en/decodeObjCType:at: and en/decodeDataObject: methods. How should my subclasses handle requests to en/decode ObjC types or objects their targeted file format does not support? I would consider paralleling NSCoder and NSCoding but that would require writing categories to implement my equivalents of initWithCoder: and encodeWithCoder: on the foundation kit classes the file format does support which is something I'd rather not do and there are probably other problems I can't think of at the moment. Any help would be appreciated.

- James

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to 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.