• 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: Archiving - Unarchiving
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Archiving - Unarchiving


  • Subject: Re: Archiving - Unarchiving
  • From: Matt Neuburg <email@hidden>
  • Date: Mon, 6 May 2002 10:09:15 -0700

On Wed, 1 May 2002 09:29:55 +0100 (BST), Manuel Arturo Marques Pita
<email@hidden> said:

>I need to read from a file that is produced by a text editor, it just
>contains normal characters no special encodings. With this file I need to
>init a NSString. I need to be able to do the opposite thing also: generate
>an NSString and write it to a file the user can then see on any text editor.
>
>How can I do this? when I encode my objects and write them into files and
>open them I can only see encoded objects that cannot be read or modified
>in a text editor.

So don't encode. I don't see what this matter has to do with archiving and
unarchiving. NSString comes with nice methods that do just what you want;
look, for example, at its -writeToFile:atomically:. m.
--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: [sort of OT] PackageMaker help
  • Next by Date: Re: Current application
  • Previous by thread: Archiving - Unarchiving
  • Next by thread: Using pathnames with special characters
  • Index(es):
    • Date
    • Thread