<doc>
  <legacy_id>2119</legacy_id>
  <name>newStack</name>
  <type>message</type>
  <syntax>
    <example>newStack</example>
  </syntax>
  <library></library>
  <objects>
    <card/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Objects &amp; Messages</category>
  </classification>
  <references>
    <command tag="create stack">create stack Command</command>
    <message tag="deleteStack">deleteStack 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> of a new <object tag="stack">stack</object> right after the <object tag="stack">stack</object> is created.</summary>
  <examples>
    <example>on newStack <code><i>-- store a path for later use in a closeStack handler</i></code></p><p>  ask file "Where do you want to store the backup?" with \</p><p>     char 1 to 24 of the short name of this stack &amp;&amp; "Backup"</p><p> set the backupLocation of the target to it</p><p>end newStack</example>
  </examples>
  <description>
    <p>Handle the <b>newStack</b> <keyword tag="message box">message</keyword> if you want to create additional <glossary tag="object">objects</glossary> or do other tasks when a new <object tag="stack">stack</object> is created.</p><p/><p><b>Comments:</b></p><p>Normally, the <b>newStack</b> <keyword tag="message box">message</keyword> is handled at a higher level of the <glossary tag="message path">message path</glossary>, since the newly-created <object tag="stack">stack</object> does not yet have a <property tag="script">script</property> unless the <keyword tag="templateStack">templateStack</keyword> contains one.</p><p/><p>The actual creation is not triggered by the <b>newStack</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 created.</p>
  </description>
</doc>