beginSheetForDirectory
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.