How to Quit with a button
ambassador at fourthworld.com
Mon Dec 8 22:13:35 CET 2014
William Prothero wrote:
> I got no response from the doMenu command, so perhaps I needed
> to include the shortcut key in the name?
DoMenu is pretty limited in LiveCode. It was necessary in HyperCard
because that language wasn't rich enough to build an entire IDE in, so
the only way you could invoke some of the IDE features was through
"doMenu" as a sort of catch-all.
In LiveCode of course the IDE is make in its own language, so anything
you see in the IDE can be done more directly in your own stacks than
having to rely on a generic catch-all.
If you do need to trigger an IDE menu item, you can dispatch a menuPick
handler to the relevant menu button in revMenubar with the name of the
menu item as its param.
But quit is very essential - every app needs it - so that's built right
into the language with the "quit" command.
If you need to do any processing before the app actually quits, you can
trap the shutdownRequest message.
Fourth World Systems
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
Follow me on Twitter: http://twitter.com/FourthWorldSys
More information about the use-livecode