• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: dataUsingEncoding: vs. archivedDataWithRootObject:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: dataUsingEncoding: vs. archivedDataWithRootObject: (From: Eric Lin <email@hidden>)

  • Prev by Date: Re: slow NSWorkspaceDidWakeNotification
  • Next by Date: Re: Newbie Trouble with Basic Bindings
  • Previous by thread: Re: dataUsingEncoding: vs. archivedDataWithRootObject:
  • Next by thread: NSTask keeps running - how to stop?
  • Index(es):
    • Date
    • Thread