shutdownRequest | |
Type | message |
Dictionary | LCS |
Library | LiveCode Script |
Syntax |
|
Associations | card |
Summary | Sent to the current card of the defaultStack when the user tries to quit the application. |
Introduced | 1.0 |
Changes | Handling of the SIGTERM signal was introduced in version 2.0. In previous versions, the SIGTERM signal did not cause a message to be sent. |
OS | mac, windows, linux, ios, android |
Platforms | desktop, server, mobile |
Example |
|
Related | Property: defaultStack Command: quit Glossary: application, current card, current stack, handler, message path, pass, message, trap, object Control Structure: pass |
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. Passing 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. Passing the message causes the application to quit normally. If the message is trapped, the signal is ignored.
|
Tags | windowing |