Re: Write to a text file
Re: Write to a text file
- Subject: Re: Write to a text file
- From: Daniel Keen <email@hidden>
- Date: Mon, 6 May 2002 03:59:00 -0400 (EDT)
Ben O'Neill wrote:
>
{
>
NSString *temp = titleField;
>
[temp writeToFile:@"/ben.txt" atomically: YES];
>
}
..
>
[NSTextField writeToFile:atomically:]: selector not recognized
Apparently, Ben, titleField is an instance of NSTextField. When you assign
it to the NSString variable temp, it remains an NSTextField. Therefore,
when you try to do writeToFile, it complains that NSTextField doesn't support
that (which it doesn't).
What you want is:
NSString *temp = [titleField stringValue];
Daniel S.Keen
Cornell University '04
'97 SM #97 Camaro Z28
(pardon typing errors - telnetting to 25 to write this)
_______________________________________________
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.