Re: dataUsingEncoding: vs. archivedDataWithRootObject:
Re: dataUsingEncoding: vs. archivedDataWithRootObject:
- Subject: Re: dataUsingEncoding: vs. archivedDataWithRootObject:
- From: "James Chen a.k.a. 陳銘崧" <email@hidden>
- Date: Wed, 16 Mar 2005 09:44:03 +0800
> But if I want my document file to be readable by other people's
> program then dataUsingEncoding is what I would use right?
>
Yes, but dataUsingEncoding is a method of NSString which means you could use
it since your data could be represented as a string. On the other hands,
once you have a string represent your data, then you could call [NSString
writeToFile: atomically:] without converting its encoding.
> Is there a way to read in objects written out using
> archivedDataWithRootObject without having the classes for these
> objects linked in?
>
No, I mean, you couldn't unarchive the data contains the object which you
don't have its class. Unless you use the "standard" classes as your data.
Standard classes I talk about here are classes in Cocoa who conform to
NSCoding protocol.
HTH,
James
> TIA,
> Eric
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden