Sheets to dialogs
Sheets to dialogs
- Subject: Sheets to dialogs
- From: John Stiles <email@hidden>
- Date: Wed, 4 Jan 2006 16:11:34 -0800
I am currently redesigning the look-and-feel of an app.
The old version of the app would show a window and then drop a sheet via
[parentWindow makeKeyAndOrderFront:NULL];
[NSApp beginSheet:sheet
modalForWindow:parentWindow
modalDelegate:NULL
didEndSelector:NULL
contextInfo:NULL];
One cool side benefit here was that, while the sheet was showing, you
couldn't quit the app; if you hit cmd+Q, the computer would just beep
at you.
I'm trying to redesign this screen to just use a regular window,
instead of a window with a sheet on it. So the new code does this:
[window center];
[window makeKeyAndOrderFront:NULL];
This works, but cmd+Q is still enabled. Presumably, there are other
minor technicalities that going into "sheet mode" took care of for
me, that aren't being taken care of now.
How can I make it work like before?
I did try
[NSApp runModalForWindow:window];
But this seems to cause the main thread to stop dead in its tracks;
beginSheet didn't have this effect.
Do I want beginModalSessionForWindow? Is there another way that I'm
missing?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden