Re: beginSheetForDirectory
Re: beginSheetForDirectory
- Subject: Re: beginSheetForDirectory
- From: email@hidden
- Date: Sat, 4 Jan 2003 10:58:19 +0100
On samedi, janvier 4, 2003, at 03:30 AM, Carla Lewis wrote:
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];
}
2 solutions:
1) Add an outlet to your Controller and link it to your window
2) Use the outlet for the NSButton if you have one and use [myButton
window]
_______________________________________________
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.