<doc>
  <legacy_id>1710</legacy_id>
  <name>substacks</name>
  <type>property</type>
  <syntax>
    <example>set the substacks of <i>stack</i> to <i>substacksList</i></example>
  </syntax>
  <library></library>
  <objects>
    <stack/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Objects &amp; Messages</category>
  </classification>
  <references>
    <function tag="mainStacks">mainStacks Function</function>
    <command tag="revert">revert Command</command>
  </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>Specifies which <function tag="stacks">stacks</function> are associated with a <glossary tag="main stack">main stack</glossary>, and saved in the same <keyword tag="file">file</keyword>.</summary>
  <examples>
    <example>put the substacks of this stack after loadedStacks</example>
    <example>if the substacks of stack "Hello" contains "Goodbye" then exit mouseUp</example>
    <example>get the substacks of stack "/Disk/Folder/stackfile.rev"</example>
  </examples>
  <description>
    <p>Use the <b>substacks</b> <glossary tag="property">property</glossary> to organize <function tag="stacks">stacks</function> in <function tag="files">files</function>.</p><p/><p><b>Value:</b></p><p>The <b>substacks</b> of a <object tag="stack">stack</object> is a list of <function tag="stacks">stacks</function>, one per <keyword tag="line">line</keyword>.</p><p/><p><b>Comments:</b></p><p>Each LiveCode file contains either a single main stack, or a main stack and one or more substacks. The <b>substacks</b> <glossary tag="property">property</glossary> reports on the <property tag="substacks">substacks</property> of a <glossary tag="main stack">main stack</glossary>.</p><p/><p>The <b>substacks</b> of a <glossary tag="substack">substack</glossary> is empty. Attempting to set the <b>substacks</b> <glossary tag="property">property</glossary> of a <glossary tag="substack">substack</glossary> causes an <glossary tag="execution error">execution error</glossary>.</p><p/><p>Setting the <b>substacks</b> of a <glossary tag="main stack">main stack</glossary> to empty removes all the <property tag="substacks">substacks</property> from memory. The next time the <glossary tag="main stack">main stack</glossary> is saved, the <property tag="substacks">substacks</property> are removed permanently.</p><p/><p><code/><img src="202650"/> <b>Caution!</b><code/> You can move a <glossary tag="substack">substack</glossary> from one <glossary tag="main stack">main stack</glossary> to another by setting the <b>substacks</b> <glossary tag="property">property</glossary> of the destination <object tag="stack">stack</object>. However, since this may cause a conflict if more than one <glossary tag="substack">substack</glossary> with the same name is open or in memory, it is safer to move a <glossary tag="substack">substack</glossary> by setting the <glossary tag="substack">substack's</glossary> <property tag="mainStack">mainStack</property> <glossary tag="property">property</glossary>.</p>
  </description>
</doc>