<doc>
  <legacy_id>1737</legacy_id>
  <name>closeCard</name>
  <type>message</type>
  <syntax>
    <example>closeCard</example>
  </syntax>
  <library></library>
  <objects>
    <card/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Navigation &amp; Hypertext</category>
  </classification>
  <references>
    <message tag="preOpenCard">preOpenCard Message</message>
    <message tag="closeStack">closeStack Message</message>
    <message tag="closeBackground">closeBackground Message</message>
    <message tag="shutdown">shutdown Message</message>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Sent to the <glossary tag="current card">current card</glossary> when the user goes to another <keyword tag="card">card</keyword>.</summary>
  <examples>
    <example>on closeCard <code><i>-- record date and time the card was last viewed</i></code></p><p><code><i>  -- in a custom property of the card</i></code></p><p>  set the lastAccessDate of the target to the seconds</p><p>  pass closeCard</p><p>end closeCard</example>
  </examples>
  <description>
    <p>Handle the <b>closeCard</b> <keyword tag="message box">message</keyword> if you want to perform cleanup or do other tasks when the user leaves a <keyword tag="card">card</keyword>.</p><p/><p><b>Comments:</b></p><p>A card is closed when the user either goes to another card in the same stack, or closes the stack.</p><p/><p>The actual navigation is not triggered by the <b>closeCard</b> <keyword tag="message box">message</keyword>, so <glossary tag="trap">trapping</glossary> the <keyword tag="message box">message</keyword> and not allowing it to <control_st tag="pass">pass</control_st> does not prevent the <keyword tag="card">card</keyword> from closing.</p>
  </description>
</doc>