Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comments on the Quit command



Ivan Drucker <email@hidden> wrote:

>I think my real concern
>is that Mac users should be able (in my view) to download any Java
>application and run it safely, regardless of whether the author even
>knows what a Mac is.

I'm afraid "safely" is a relative term, and depends entirely on how well
the app in question is written. I can't tell you how many times I've heard
developers confidently assert "My program is completely cross-platform",
only to be ambushed by a bunch of faulty underlying assumptions that are
Windows-specific, Unix-specific, or lie somewhere between uninformed and
fatuous. Personally, I always start from the assumption that I don't
completely understand ANY of the target platforms, even my favorite one,
and then I code defensively around that assumption. I/O, GUIs, and
threading are the main pitfalls, but there are certainly others.


>I understand the desire to always provide a way out in case the Java
>program in question doesn't provide one, as well as to always keep the
>Application menu consistent and Quit where people expect to find it.

On Mac OS X, users can always resort to Force-Quit if they have to. This
is far more accessible than it was in classical Mac OS, and is far more
reliable, too. Forcibly snuffed-out apps can still leave junk lying
around, though, so it's not a panacea.

Given that Force-Quit is available, I think the least Apple should do is
remove the cmd-Q from the Application menu's Quit command. That alone
would solve the problem of accidental cmd-Q "summary exit", yet still leave
desperate users an out (with Force-Quit) for Truly Ill-behaved Programs.
Well-behaved programs, of course, have their own Quit/Exit menu-item.

Yes, it would still be confusing to see a Quit item under the Application
menu as well as under the File menu, but I'm afraid there aren't a lot of
other options. The standard tacit assumption is that Quit/Exit is under
the File menu, just as The Macintosh revealed to us in its First Coming,
and as all humanity has come to believe since.

Looking for "Quit" in an app's File menu is hugely error-prone. Even in US
English, the menu-item name might be "Exit" instead of "Quit", and it will
certainly be something else in every other human language.

A com.apple.mrj.apple.menu.quit property doesn't solve anything, unless
it's to ENABLE the menu-item in the Application menu. If it disabled the
menu-item, then you're going against your earlier principle of being able
to run any Java program, regardless of whether the author even knows what a
Mac is.

Incidentally, Unix has a slightly similar problem in that signals can
summarily force a program to exit (Windows has some similar signals, too).
Sometimes this is desirable, but other times it's really bad. Worse, the
standard behavior is to emit a thread-dump for some signals, which is
certainly not the intent of some of the signals (e.g. SIGHUP). Catching
and handling signals under Unix is covered by my open source Easy Posix
Toolkit:
<http://www.amug.org/~glguerin/sw/#easyposix>

I think it's a decent design and set of abstractions, however, I only
provide a Mac OS X implementation.

-- GG
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.