Trapping Command-q
Marty Knapp
martyknapp at comcast.net
Wed May 17 23:40:34 EDT 2006
In my experience, trapping for a quit message on OS X is not reliable.
It works most of the time, but not all of the time. Ken's method, which
my previous post referred to, is the only method that I've found to be
reliable. Specifically, his "Brute force" method. (He details 2 methods
on his site.)
Marty Knapp
> On 5/18/06, Jason Tangen <jtangen at psy.uq.edu.au> wrote:
>> Can someone tell me how to prevent a user from using Command-q to
>> quit Revolution? I'm sure that I used to be able to do it, but not
>> anymore. Did something change?
>
> How about trapping the commandKeyDown message?
>
> on commandKeyDown pKey
> if pKey = "Q" then
> answer "You are not allowed to quit :-)"
> else
> pass commandKeyDown
> end if
> end commandKeyDown
>
>
> HTH,
> Sarah
More information about the use-livecode
mailing list