Sent to the current card when the stack closes.
# Metadata
Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:
# Syntax
closeStack
# Examples
on closeStack -- automatically save changes save this stack pass closeStack end closeStack
# Description
Handle the closeStack message if you want to perform cleanup or do other tasks when the user closes a window.
A stack is closed when the user or a handler closes the stack window.
The actual closing is not triggered by the closeStack message, so trap the message and not allowing it to pass does not prevent the stack from closing. To prevent a stack from closing, trap the closeStackRequest message.
# Tags
ui,
# See
- **property:** closeBox - **message:** closeStackRequest, unIconifyStack, closeBackground, preOpenStack, shutdown, suspendStack, saveStackRequest, closeCard - **object:** stack - **glossary:** trap, current card, message - **control structure:** pass