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
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to