Quit

Klaus on-rev klaus at major.on-rev.com
Mon Jan 10 07:24:05 EST 2011


Hi Jaqueline and Richmond,

> On 1/9/11 6:40 AM, Richmond wrote:
>> I want to disable the ability of Mac users to QUIT
>> by pressing Command-Q; tis is to force them to
>> use localised QUIT buttons (each with slightly
>> different characteristics) on cards within a stack.
> 
> Try trapping the shutdownrequest message.

I think you will need to trap the appropriate AppleEvent, since the "Quit"
menu in any OS X app is managed by the OS!

Put this into the script of your mainstack:
on appleEvent theClass,theID
  ## dosc = Do Script
  ## rapp = resume app
  ## odoc = open document
  ## quit = quit
  
  ## Only "trap" the quit command and let all other apple event pass!
  if theID <> "quit" then
      pass appleevent
  end if
end appleEvent

That should do what you want.

> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major.on-rev.com





More information about the Use-livecode mailing list