Trapping Command-q

Marty Knapp martyknapp at comcast.net
Thu May 18 00:13:08 EDT 2006


Hey Jason,

I fought with this for some time myself on my OS X standalones, and 
finally ended up with commandkeyDown handler for everything I needed, 
except the quit routine, then stumbled on Ken's fix which has been 100% 
for that part. It's a pretty good solution, all-in-all.

Marty Knapp
> Sarah's commandKeyDown trap doesn't seem to work, which is why I'm 
> puzzled.  Marty: Ken's method would work to prevent the user from 
> quitting Rev, but I was hoping to find a more general method that I 
> might use to trap various Apple events such as Command-P and 
> Command-W.  Again - I'm sure that I used a solution like Sarah's once 
> upon a time, but it doesn't seem to work now.  Obviously this wasn't 
> an issue at all in MetaCard...
>
> Cheers,
> Jason
>
>> 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
>>
>>>> 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
>>>>
>>> On 5/18/06, Jason Tangen <jtangen at psy.uq.edu.auwrote:
>>> 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?
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the Use-livecode mailing list