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

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.

  • Prev by Date: Action is not recognized
  • Next by Date: ProjectBuilderWO and April Dev-Tools
  • Previous by thread: Re: Write to a text file
  • Next by thread: Re: Write to a text file
  • Index(es):
    • Date
    • Thread