• 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 Where's my "New Folder" button?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re Where's my "New Folder" button?


  • Subject: re Where's my "New Folder" button?
  • From: Jeff Childers <email@hidden>
  • Date: Fri, 27 Jun 2003 12:12:21 -0500

from learning cocoa with objective c
brings up the standerd save window

- (IBAction)save:(id)sender
{
NSSavePanel * savePanel = [NSSavePanel savePanel];
SEL sel = @selector(savePanelDidEnd:returnCode:contextInfo:);
[savePanel beginSheetForDirectory:@"~/Documents"
file:@"menu.items"
modalForWindow:[table window]
modalDelegate:self
didEndSelector:sel
contextInfo:nil];
}

- (void)savePanelDidEnd:(NSSavePanel *)sheet
returnCode:(int)returnCode
contextInfo:(void *)context
{
if (returnCode == NSOKButton) {
[NSArchiver archiveRootObject:items toFile:[sheet filename]];
}
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: View deallocation
  • Next by Date: [OT] Re: New Panther UI Widgets?
  • Previous by thread: Re: View deallocation
  • Next by thread: Dynamic loading of System Frameworks???
  • Index(es):
    • Date
    • Thread