Re: custom sheet modal to window
Re: custom sheet modal to window
- Subject: Re: custom sheet modal to window
- From: Sherm Pendley <email@hidden>
- Date: Sun, 9 May 2004 13:54:03 -0400
On May 9, 2004, at 12:49 PM, Chuck Soper wrote:
I'm trying to display a custom sheet that is model to the window only.
I want the rest of the application of remain functional.
Get rid of the app modal calls, and move the code to close the sheet to
the okAbout: action method.
- (IBAction)about:(id)sender
{
[NSApp beginSheet: aboutSheet
modalForWindow: [parentWindowController window]
modalDelegate: nil
didEndSelector: nil
contextInfo: nil];
}
- (IBAction)okAbout:(id)sender;
{
[NSApp endSheet: aboutSheet];
[aboutSheet: orderOut: self];
}
I followed the example here:
http://developer.apple.com/documentation/Cocoa/Conceptual/Sheets/
Tasks/UsingCustomSheets.html#//apple_ref/doc/uid/20001290
I've been wondering why people kept mistakenly using
-runModalForWindow: with sheets for *years* now. Literally years - ever
since 10.0. Now I know. What a horrible example!
Looks like I'll be getting acquainted with radar...
sherm--
_______________________________________________
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.