Sent to the current card of the defaultStack when the user tries to quit the application.
# Metadata
Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:
# Syntax
shutdownRequest
# Examples
on shutdownRequest answer question "Are you sure you want to quit?" with "Yes" or "No" if it is "Yes" then pass shutdownRequest end shutdownRequest
# Description
Handle the shutdownRequest message if you want to prevent the user from quitting the application.
If the shutdownRequest handler does not pass the message or send it to a further object in the message path, the application does not exit. pass the message allows the application to quit.
In standalones, some care is needed to ensure you receive the shutdownRequest message if your application uses multiple stacks. The most reliable approach is to install a library stack or backscript to handle the message when your application starts up.
On OS X and Unix systems, if the operating system sends a SIGTERM signal to the application, LiveCode sends a shutdownRequest message to the current stack. pass the message causes the application to quit normally. If the message is trap, the signal is ignored.
>*Note:* Applications will not receive this message when running in the > IDE.
# Tags
# See
- **property:** defaultStack - **command:** quit - **glossary:** application, current card, current stack, handler, message path, pass, message, trap, object - **control structure:** pass