Re: Sheet interferes with close widget and app quit
Re: Sheet interferes with close widget and app quit
- Subject: Re: Sheet interferes with close widget and app quit
- From: Bill Cheeseman <email@hidden>
- Date: Mon, 20 Aug 2001 16:12:26 -0400
on 8/20/01 1:49 PM, Adam Iser at email@hidden wrote:
>
I've got a single window application that connects to a remote server.
>
When the application loads, I slide out a sheet on my main window asking
>
for name and password. At this point, I'd like the user to still be
>
able to hide the window (by closing it) and quit my application (with
>
the quit menu item), without having to dismiss the sheet first.
>
>
Unfortunately the sheet "automatically" disables my window's close
>
widget... how annoying! ;) And when the sheet is displayed, quitting my
>
app (Apple-Q) only produces and alert Beep... equally annoying.
>
>
Is there a simple solution to either of these problems?
There exists documentation that explains (or hints at an explanation of) how
to dismiss both the sheet and the window. The same technique might be usable
to dismiss the sheet and quit the application simultaneously. I believe this
is documented in the Cocoa release notes for Public Beta, or maybe for PB4,
but not yet picked up in the Mac OS X documentation. Search for the
"NSBeginAlertsheet" function and see what you find.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
The AppleScript Sourcebook - www.AppleScriptSourcebook.com
Vermont Recipes - www.stepwise.com/Articles/VermontRecipes