RE: saving tables and user defined strings
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-----