• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Sheets to dialogs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Sheets to dialogs
      • From: Adam Leonard <email@hidden>
  • Prev by Date: Re: MainMenu
  • Next by Date: Re: Breakpoints in categories are ignored?
  • Previous by thread: Re: Core Data Binding: Reading a binary image (TIFF) {part deux}
  • Next by thread: Re: Sheets to dialogs
  • Index(es):
    • Date
    • Thread