• 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: saving tables and user defined strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: saving tables and user defined strings


  • Subject: RE: saving tables and user defined strings
  • From: "Stuppel, Searle @ San Diego Central" <email@hidden>
  • Date: Tue, 14 Aug 2001 12:41:31 -0700

- (IBAction)reportSave:(id)sender
{
NSSavePanel *sp;
int runResult;
NSString *totalReport;

sp = [NSSavePanel savePanel];
[sp setRequiredFileType:@"txt"];
[sp setTitle:@"Save Your Report"];

runResult = [sp runModalForDirectory:NSHomeDirectory () file:@""];

if (runResult == NSOKButton)
{
totalReport = @"blah blah blah blah";
[totalReport writeToFile:[sp filename] atomically:YES];
}
}



Try that. it works for me.
To connect it to the menu, just make the action called reportSave: and link
it FROM the menu item to the controller. Same as a button is linked.

Searle Stuppel
CB Richard Ellis, Inc.
Direct: 858-546-4600
Fax: 858-546-4616
Toll Free: 800-334-9347
email@hidden


-----Original Message-----

  • Prev by Date: NSURL Questions
  • Next by Date: Re: EOF Advocacy, Open Source?
  • Previous by thread: Re: saving tables and user defined strings
  • Next by thread: RE: saving tables and user defined strings
  • Index(es):
    • Date
    • Thread