Re: Write to a text file
Re: Write to a text file
- Subject: Re: Write to a text file
- From: Timothy Larkin <email@hidden>
- Date: Mon, 06 May 2002 07:32:06 -0400
On 2002.05.06 03:25, "Ben O'Neill" <email@hidden> wrote:
>
Thanks Nathan,
>
Thats helped me, but when I use the below code:
>
>
{
>
NSString *temp = titleField;
>
[temp writeToFile: @"/ben.txt" atomically: YES];
>
}
>
>
I get this error message:
>
>
2002-05-06 17:24:02.948 DVD Manager[1939] *** -[NSTextField
>
writeToFile:atomically:]: selector not recognized
If titleField is an instance of NSTextField, then temp is an NSTextField as
well, and NSTextField does not have the writeToFile:atomically method. The
assignment does not cause a implicit type conversion. The string value of
the titleField has to be explicitly extracted and assigned to temp. Thus
NSString *temp = [titleField stringValue];
--
Timothy Larkin
Abstract Tools
Caroline, NY
_______________________________________________
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.