Error getting tags :
error 404Error getting tags :
error 404 closeStackRequest | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
closeStackRequest
Basics
Expander triangle
Type
Message
Syntax

closeStackRequest

Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Sent to the current card when the user tries to close a stack.
Examples

on closeStackRequest
answer "Are you sure?" with "No" or "Yes"
if it is "Yes" then pass closeStackRequest
end closeStackRequest

Additional Comments
Expander triangle

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

Comments:

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 Revolution menu). If the request is initiated from a script (eg "close this stack") then the closeStackRequest message is not sent.

User Comments
Expander triangle
User thumbnail
Klaus Major
StarStarStarStarStar
Aug 26, 2009
IMPORTANT HINT! "... (eg by clicking file -> close in the Revolution menu)." This is NOT true, since the menu item "Close" IS in fact a script, so COMMAND-W (which triggers this menuitem) and selecting "Close" from the Rev menu do NOT send a "closestackrequest" message!
The "closestackrequest" message will ONLY be sent if the user clicks the close button in the window title bar!