forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloseCard.lcdoc
More file actions
42 lines (28 loc) · 1.04 KB
/
closeCard.lcdoc
File metadata and controls
42 lines (28 loc) · 1.04 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
37
38
39
40
41
Name: closeCard
Type: message
Syntax: closeCard
Summary:
Sent to the <current card> when the user goes to another <card>.
Associations: card
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
on closeCard -- record date and time the card was last viewed
-- in a custom property of the card
set the lastAccessDate of the target to the seconds
pass closeCard
end closeCard
Description:
Handle the <closeCard> <message> if you want to perform cleanup or do
other tasks when the user leaves a <card>.
A card is closed when the user either goes to another card in the same
stack, or closes the stack.
The actual navigation is not triggered by the <closeCard> <message>, so
<trap|trapping> the <message> and not allowing it to <pass> does not
prevent the <card> from closing.
References: pass (control structure), trap (glossary),
current card (glossary), message (glossary), card (keyword),
closeStack (message), shutdown (message), closeBackground (message),
preOpenCard (message)
Tags: navigation