forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeleteStack.lcdoc
More file actions
36 lines (23 loc) · 1.23 KB
/
Copy pathdeleteStack.lcdoc
File metadata and controls
36 lines (23 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Name: deleteStack
Type: message
Syntax: deleteStack
Summary: Sent to the <current card> of a <stack> that's about to be deleted.
Associations: card
Introduced: 1.0
OS: mac,windows,linux,ios,android
Platforms: desktop,server,web,mobile
Example:
on deleteStack -- warn the user
if the mainStack of the owner of the target \
is not the owner of the target then -- it's a substack
answer "This stack will be permanently deleted the" && \
"next time you save the file."
end if
pass deleteStack
end deleteStack
Description:
Handle the <deleteStack> <message> if you want to perform cleanup before a <stack> is deleted from its <stack file>.
The actual deletion is not triggered by the <deleteStack> <message>, so <trap|trapping> the <message> and not allowing it to <pass> does not prevent the <stack> from being removed.
If a stack's file is deleted with the delete file <command> (or by the user), and the stack itself is not open, no <deleteStack> <message> is sent.
References: destroyWindow (property), cantDelete (property), newStack (message), delete stack (command), stack (object), trap (glossary), stack file (glossary), current card (glossary), message (glossary), command (glossary), pass (control_st)
Tags: objects