Re: Display dialog frontmost?
Re: Display dialog frontmost?
- Subject: Re: Display dialog frontmost?
- From: Christopher Nebel <email@hidden>
- Date: Fri, 13 Sep 2002 10:16:11 -0700
On Thursday, September 12, 2002, at 06:51 PM, Shane Stanley wrote:
There's little more irritating than having a dialog shoved in your
face
when you're doing something MORE IMPORTANT (I'll be the judge of that
too, thank you.)
But you may well be a bad judge. For example, if the script is doing
something that also involves the application you have frontmost, and
you
decide to ignore the bouncing icon, you could end up doing something
that
breaks the script. You may consider that your right, but the script's
ceding
it to you is not very helpful.
Okay, I'm going have to amend my statement a bit. I suggest folks read
Chapter 1 of the Aqua (formerly "Apple") Human Interface Guidelines
(<
http://developer.apple.com/techpubs/macosx/Essentials/
AquaHIGuidelines>). In particular...
"Allow the user, not the computer, to initiate and control actions.
Some applications attempt to take care of the user by offering only
alternatives judged good for the user or that protect the user from
having to make detailed decisions. This approach mistakenly puts the
computer, not the user, in control.
The key is to create a balance between providing users with the
capabilities they need to get their work done and helping them avoid
dangerous irreversible actions. For a situation in which a user may
destroy data accidentally, for example, you should always provide a
warning and still allow the user to proceed if desired."
On the other hand, the page right after that says "keep users informed
about what's happening with your product." In the case of popping up
alerts, it comes down to a question of how badly the user needs to know
what's going on.
Imagine the program as a human personal assistant -- every time the
script throws a dialog in front of everything, that's equivalent to
your assistant barging into your office with a question. If the
interruption is because the veeblefetzer has jammed, and you're
"losing" $1000 every minute until it's fixed, then that's probably
acceptable, so Mr. Angier has a valid point there. If, on the other
hand, your assistant keeps bugging you every five minutes for another
file when they could have just asked you up front for ten and then left
you alone for an hour, you'd probably fire them.
I'm not saying that you should absolutely never force yourself to the
front, but you should have a good reason for doing so. While you're
thinking about what constitutes a good reason, remember that your user
probably has other things to do, and your program probably *isn't* the
center of their world. (Again, the critical workflow application is a
valid exception -- it very likely has a computer and a person dedicated
to it.)
A couple other random points:
- Switching applications in immediate response to a user action is
fine. What you shouldn't do (subject to the above) is switch
applications without an immediate user action, e.g., they set your
script running five minutes ago.
- Commands sent to yourself (e.g., "tell me to display dialog") are not
subject to timeouts. The user can take as long as they like to
respond. If you tell someone else, then you need to deal with the
timeout issues.
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.