custom sheet modal to window
custom sheet modal to window
- Subject: custom sheet modal to window
- From: Chuck Soper <email@hidden>
- Date: Sun, 9 May 2004 09:49:01 -0700
Hello,
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. My
window is not document based (if that matters).
I have the sheet working except most of the application menu items
become disabled and stay disabled even when the sheet goes away. Here
is my code:
- (IBAction)about:(id)sender
{
[NSApp beginSheet: aboutSheet
modalForWindow: [parentWindowController window]
modalDelegate: nil
didEndSelector: nil
contextInfo: nil];
[NSApp runModalForWindow: aboutSheet];
// Sheet is up here.
[NSApp endSheet: aboutSheet];
[aboutSheet orderOut: self];
}
- (IBAction)okAbout:(id)sender;
{
[NSApp stopModal];
}
These two actions are connected appropriately in IB.
I followed the example here:
http://developer.apple.com/documentation/Cocoa/Conceptual/Sheets/Tasks/UsingCustomSheets.html#//apple_ref/doc/uid/20001290
It says:
"The user is still allowed to interact with the custom sheet (it
wouldn't make sense not to allow this), but activity in the rest of
the application is suspended while this sheet is presented."
Does know anyone know how to modify this example such when the sheet
is down only its parent window is modal not the entire application.
Thanks for any help,
Chuck
_______________________________________________
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.