Re: Quit menu item undimming itself?!
Re: Quit menu item undimming itself?!
- Subject: Re: Quit menu item undimming itself?!
- From: John Stiles <email@hidden>
- Date: Tue, 9 May 2006 16:30:43 -0700
On May 9, 2006, at 4:15 PM, Matt Neuburg wrote:
On Tue, 9 May 2006 13:57:16 -0700, John Stiles
<email@hidden> said:
The app I'm working on is the moral equivalent of Apple's Software
Update. It basically works the same way Software Update does˜quitting
is disallowed in the middle of an operation; instead there is a sheet
with a Cancel button that the user can click.
The Apple Installer also behaves the same as my app˜it has a dialog
with a Cancel button, and the Quit menu item does not function
But it isn't dimmed, either. And indeed, if *you* put up a sheet in
*your*
app, you will find that if the user chooses Quit, your app will
just beep -
you won't even get an event. And if you put up an application-modal
dialog,
the Quit menu will dim of its own accord. So there is no need for
you to dim
the Quit menu; Cocoa does the right thing all by itself. m.
Heh, you're right. I switched from a sheet to a window recently and
that's when this became an issue at all. I said "sheet" in a prior
description of my app, but that was inaccurate; it's just a window
now. It used to be a sheet ;) In older builds, when it was a sheet,
it worked exactly like you describe it. It was kind of cool.
FWIW, I used to handle this by beeping and returning NO in
applicationShouldTerminate, but some other members of our team, as
well as our testers, agreed that if a menu item is just going to beep
at you, it should probably be dimmed. Personally I found this to be a
compelling argument and so I ended up going down this road :)
_______________________________________________
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