• 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: Saving an object to a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving an object to a file


  • Subject: Re: Saving an object to a file
  • From: Ondra Cada <email@hidden>
  • Date: Mon, 26 Apr 2004 21:27:16 +0200

On 26.4.2004, at 21:14, Marco Michieli wrote:

> - (IBAction)saveString:(id)sender
> {
> BOOL result = [NSKeyedArchiver archiveRootObject:[NSString
> stringWithString:@"Try to save this string"]
> toFile:@"~/Desktop/MyString"];
> NSLog(@"saveString result: %d (1=YES, 0=NO)", result);
> }
>
> But it doesn't work!

Actually, stringByStandardizingPath: is a very useful method ;)

In other words, the tilde (and similar tricks) is a UI-level thing; at
the engine level your paths should begin by a slash.
---
Ondra Hada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.


References: 
 >Saving an object to a file (From: Marco Michieli <email@hidden>)

  • Prev by Date: end of paragraph in NSTextView
  • Next by Date: Re: setApplicationIconImage
  • Previous by thread: Saving an object to a file
  • Next by thread: Re: Saving an object to a file
  • Index(es):
    • Date
    • Thread