<doc>
  <legacy_id>2079</legacy_id>
  <name>deleteStack</name>
  <type>message</type>
  <syntax>
    <example>deleteStack</example>
  </syntax>
  <library></library>
  <objects>
    <card/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Objects &amp; Messages</category>
  </classification>
  <references>
    <property tag="cantDelete">cantDelete Property</property>
    <command tag="delete stack">delete stack Command</command>
    <message tag="newStack">newStack Message</message>
    <property tag="destroyWindow">destroyWindow Property</property>
  </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> of a <object tag="stack">stack</object> that's about to be deleted.</summary>
  <examples>
    <example>on deleteStack <code><i>-- warn the user</i></code></p><p>  if the mainStack of the owner of the target \</p><p>     is not the owner of the target then <code><i>-- it's a substack</i></code></p><p>    answer "This stack will be permanently deleted the" &amp;&amp; \</p><p>       "next time you save the file."</p><p>  end if</p><p>  pass deleteStack</p><p>end deleteStack</example>
  </examples>
  <description>
    <p>Handle the <b>deleteStack</b> <keyword tag="message box">message</keyword> if you want to perform cleanup before a <object tag="stack">stack</object> is deleted from its <glossary tag="stack file">stack file</glossary>.</p><p/><p><b>Comments:</b></p><p>The actual deletion is not triggered by the <b>deleteStack</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 <object tag="stack">stack</object> from being removed.</p><p/><p>If a stack's file is deleted with the <b>delete file</b> <glossary tag="command">command</glossary> (or by the user), and the stack itself is not open, no <b>deleteStack</b> <keyword tag="message box">message</keyword> is sent.</p>
  </description>
</doc>