• 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 an NSTextView, and Nib troubles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving an NSTextView, and Nib troubles


  • Subject: Re: Saving an NSTextView, and Nib troubles
  • From: Stéphane Sudre <email@hidden>
  • Date: Thu, 31 May 2001 19:53:17 +0200

On jeudi, mai 31, 2001, at 03:33 PM, email@hidden wrote:

Hey, [...] to me ;-)

Why not just have a MainController with an openFile and saveFile action

The openFile method can be:

- (void) openFile:(id) sender
{
NSOpenPanel *oPanel = [NSOpenPanel openPanel];
int result;

[oPanel setAllowsMultipleSelection:NO];
[oPanel setCanChooseDirectories:NO];
[oPanel setCanChooseFiles:YES];


result = [oPanel runModalForDirectory:directoryLocation_ file:nil types:nil];
if (result == NSOKButton)
{
NSArray *filesToOpen = [oPanel filenames];

myFile_=[[filesToOpen objectAtIndex:0] retain];

// Process here if you want
}
}


References: 
 >Saving an NSTextView, and Nib troubles (From: email@hidden)

  • Prev by Date: Re: StepWise/CodeFab ScreenSaver Contest Update
  • Next by Date: RE: Icons in NSOutlineView
  • Previous by thread: Saving an NSTextView, and Nib troubles
  • Next by thread: NSDateFormatter and \n
  • Index(es):
    • Date
    • Thread