closeStackRequest

Typemessage
DictionaryLCS
LibraryLiveCode Script
Syntax
closeStackRequest
Associationscard
Summary

Sent to the current card when the user tries to close a stack.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
on closeStackRequest 
 answer "Are you sure?" with "No" or "Yes"
 if it is "Yes" then pass closeStackRequest 
end closeStackRequest
RelatedProperty: decorations
Message: closeStack
Command: close
Object: stack
Glossary: object, handler, current card, pass, message, message path
Control Structure: pass
Description

Handle the closeStackRequest message if you want to prevent a stack from being closed.

If the closeStackRequest handler does not pass the message or send it to a further object in the message path, the stack does not close. Passing the message allows the stack to close.

The closeStackRequest message is only sent if the request to close a stack is initiated by the user (eg by clicking file -> close in the LiveCode menu). If the request is initiated from a script (eg "close this stack" ) then the closeStackRequest message is not sent.

Tagsui