Re: Saving an object to a file
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.