closeCard

Typemessage
DictionaryLCS
LibraryLiveCode Script
Syntax
closeCard
Associationscard
Summary

Sent to the current card when the user goes to another card.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, 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
RelatedKeyword: card
Message: closeStack, shutdown, closeBackground, preOpenCard
Glossary: trap, current card, message
Control Structure: pass
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 trapping the message and not allowing it to pass does not prevent the card from closing.

Tagsnavigation