• 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
beginSheetForDirectory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

beginSheetForDirectory


  • Subject: beginSheetForDirectory
  • From: Carla Lewis <email@hidden>
  • Date: Fri, 3 Jan 2003 21:30:01 -0500

I'm still learning...still experimenting. I basically just have a
window in IB with a button to open a file dialog on a sheet. I don't
care about anything else right now, other than getting the sheet to
display. Problem is, I can't get a sheet. I know that
"modalForWindow" should be the parent window, I but I don't know what
to put there to point to it. Any help? This has got to be easy...

A small snippet:

- (IBAction)open:(id)sender
{
NSOpenPanel *panel=[NSOpenPanel openPanel];
[panel beginSheetForDirectory:nil
file:nil
types:nil
modalForWindow:nil
modalDelegate:self

didEndSelector:nil@selector(openPanelDidEnd:returnCode:contextInfo:)
contextInfo:NULL];

}


-(void)openPanelDidEnd:(NSOpenPanel*)panel returnCode:(int)rc
contextInfo:(void*)ci {
if (rc) NSLog(@"Chosen file %@",[panel 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.

  • Follow-Ups:
    • Re: beginSheetForDirectory
      • From: email@hidden
  • Prev by Date: Re: NSMutableDictionary Q's
  • Next by Date: Re: Ignoring an empty field in the address book
  • Previous by thread: Re: Ignoring an empty field in the address book
  • Next by thread: Re: beginSheetForDirectory
  • Index(es):
    • Date
    • Thread