Re: NSString problem
Re: NSString problem
- Subject: Re: NSString problem
- From: John Haager <email@hidden>
- Date: Thu, 2 May 2002 08:04:15 -0700
On Thursday, May 2, 2002, at 01:05 AM, Famille GOUREAU-SUIGNARD wrote:
Hi everybody,
is anybody able to explai me why the following script gives me this
error (cocoa application) :
CarApp.app has exited due to signal 11 (SIGSEGV).
- (void) actionExportation: (id)sender
{
NSString *chemin = @"/users/cathy/Documents/Gestion
stock/sortie.txt" ;
NSMutableString *chaine ;
[chaine setString:@""] ;
[chaine appendString:@"tagada"] ;
[chaine writeToFile: chemin atomically : NO] ;
}
You never allocated chaine. You need to add the line:
chaine = [ [ NSString alloc ] init ] ;
right before the setString line.
Many thanks.
Camille
_______________________________________________
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.
-> John Haager <-
_______________________________________________
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.