<doc>
  <legacy_id>1807</legacy_id>
  <name>reloadStack</name>
  <type>message</type>
  <syntax>
    <example>reloadStack <i>stackName</i>,<i>fileName</i></example>
  </syntax>
  <library></library>
  <objects>
    <stack/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Objects &amp; Messages</category>
  </classification>
  <references>
    <function tag="mainStacks">mainStacks Function</function>
    <property tag="destroyStack">destroyStack 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 a <glossary tag="main stack">main stack</glossary> when the user tries to open a <glossary tag="main stack">main stack</glossary> with the same <property tag="name">name</property> as a previously-opened <object tag="stack">stack</object>.</summary>
  <examples>
    <example>on reloadStack theStack,thePath <code><i>-- bring reloaded window to front</i></code></p><p><code><i> -- if you're trying to open the same file (for example, double-</i></code></p><p><code><i>  -- clicking the file), bring the already-open stack to the front:</i></code></p><p>  if the effective filename of stack theStack is thePath</p><p>  then go stack theStack</p><p>  else beep <code><i>-- trying to open a same-named stack in different file</i></code></p><p>end reloadStack</example>
  </examples>
  <description>
    <p>Handle the <b>reloadStack</b> <keyword tag="message box">message</keyword> when you want to prevent a stack from being reopened, or moderate conflicts between the names of <glossary tag="main stack">main stacks</glossary>, or prevent two <glossary tag="main stack">main stacks</glossary> with the same <property tag="name">name</property> from being open at one time.</p><p/><p><b>Parameters:</b></p><p>The <i>stackName</i> is the short <property tag="name">name</property> that belongs to the two conflicting <glossary tag="main stack">main stacks</glossary>.</p><p/><p>The <i>fileName</i> is the <glossary tag="absolute file path">full path</glossary> to the <keyword tag="file">file</keyword> that is opening--the <keyword tag="file">file</keyword> that contains the second <glossary tag="main stack">main stack</glossary> with the same name.</p><p/><p><b>Comments:</b></p><p>The opening of the stack is triggered by the <b>reloadStack</b> <keyword tag="message box">message</keyword>. This means that <glossary tag="trap">trapping</glossary> the <b>reloadStack</b> <keyword tag="message box">message</keyword> and not <glossary tag="pass">passing</glossary> it prevents the second <object tag="stack">stack</object> from being opened.</p><p/><p>If a main stack's <b>destroyStack</b> <glossary tag="property">property</glossary> is set to false, the <object tag="stack">stack</object> remains in memory--and can cause a <b>reloadStack</b> <keyword tag="message box">message</keyword> to be sent--even after its window is closed.</p>
  </description>
</doc>