discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSSavePanel


From: Stefan Bidi
Subject: NSSavePanel
Date: Wed, 23 Mar 2011 15:08:59 -0500

I've never had to use an NSSavePanel before so this is completely new to me.  I took a look at the Apple documentation for it and also an example they have.  Whenever I run the following code the button gets sunk in and highlighted (and stays that way) but the panel never shows up.  Can anyone point me in the correct direction?  I have no idea if any of what I have here actually works.  In a nutshell, I want to save the data in a NSTableView to a csv file.

- (void) save: (id)sender
{
  NSSavePanel *panel = [NSSavePanel savePanel];
 
  [panel setAllowsOtherFileTypes: NO];
  [panel setAllowedFileTypes: [NSArray arrayWithObject: @"csv"]];
  [panel beginSheetForDirectory: NULL
                           file: @"output.csv"
                 modalForWindow: [NSApp mainWindow]
                  modalDelegate: self
                 didEndSelector: @selector(savePanelDidEnd:returnCode:info:)
                    contextInfo: nil];
}

Thanks

reply via email to

[Prev in Thread] Current Thread [Next in Thread]