<doc>
  <legacy_id>1732</legacy_id>
  <name>filename of stack</name>
  <type>property</type>
  <syntax>
    <example>set the filename of <i>stack</i> to <i>filePath</i></example>
  </syntax>
  <library></library>
  <objects>
    <stack/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Objects &amp; Messages</category>
    <category>Files, Folders, &amp; Resources</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <keyword tag="effective">effective Keyword</keyword>
    <message tag="saveStackRequest">saveStackRequest Message</message>
    <property tag="stackFiles">stackFiles Property</property>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
    <changed version="2.8.1"></changed>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Reports the <glossary tag="file path">file path</glossary> of the <keyword tag="file">file</keyword> a <object tag="stack">stack</object> is stored in.</summary>
  <examples>
    <example>put the filename of this stack into nameToSave</example>
    <example>if the effective filename of this stack is savedName then beep</example>
    <example>set the filename of this stack to "Test.rev"</example>
    <example>set the filename of this stack to "/Volumes/Lizards/Godzilla.rev"</example>
  </examples>
  <description>
    <p>Use the <b>filename of stack</b> <glossary tag="property">property</glossary> to specify where a <glossary tag="stack file">stack file</glossary> is stored on the user's system.</p><p/><p><b>Value:</b></p><p>The <b>filename of stack</b> of a <object tag="stack">stack</object> specifies the <glossary tag="file path">name and location</glossary> of the <glossary tag="stack file">stack file</glossary>. If you specify a name but not a location, LiveCode assumes the <keyword tag="file">file</keyword> is in the <property tag="defaultFolder">defaultFolder</property>.</p><p/><p>By default, the <b>filename of stack</b> <glossary tag="property">property</glossary> of newly created <function tag="stacks">stacks</function> is set to empty.</p><p/><p><b>Comments:</b></p><p>If the <i>stack</i> is a <glossary tag="main stack">main stack</glossary>, its <b>filename of stack</b> <glossary tag="property">property</glossary> reports the <glossary tag="file path">file path</glossary> of the <keyword tag="file">file</keyword> the <object tag="stack">stack</object> is stored in. If the <i>stack</i> is the <glossary tag="main stack">main stack</glossary> of a <glossary tag="standalone application">standalone application</glossary>, the <b>filename of stack</b> <glossary tag="property">property</glossary> reports the <glossary tag="file path">name and location</glossary> of the application.</p><p/><p>If the <i>stack</i> is a <glossary tag="substack">substack</glossary>, its <b>filename of stack</b> <glossary tag="property">property</glossary> is empty. To find out what <keyword tag="file">file</keyword> a <glossary tag="substack">substack</glossary> is stored in, use the form the effective filename of<i> stack</i>. You cannot set the <b>filename of stack</b> <glossary tag="property">property</glossary> of a <glossary tag="substack">substack</glossary> and attempting to will result in an execution error being thrown.</p><p/><p>If the stack has not yet been saved, its <b>filename of stack</b> <glossary tag="property">property</glossary> is empty.</p><p/><p><img src="202652"/> <b>Cross-platform note:</b> On <glossary tag="OS X">OS X systems</glossary>, <glossary tag="standalone application">standalone applications</glossary> are stored as <glossary tag="application bundle">application bundles</glossary>. A <glossary tag="application bundle">bundle</glossary> behaves like a <keyword tag="file">file</keyword> but is actually a <property tag="defaultFolder">folder</property>, and the <glossary tag="main stack">main stack</glossary> of a <glossary tag="standalone application">standalone application</glossary> is inside this <property tag="defaultFolder">folder</property>. The <b>filename of stack</b> <glossary tag="property">property</glossary> reports the location of the application inside the <glossary tag="application bundle">bundle</glossary>, not the <glossary tag="application bundle">bundle's</glossary> location. For example, if the <glossary tag="application bundle">bundle's</glossary> <glossary tag="file path">file path</glossary> is "/Volumes/Disk/MyApp.app/", the <b>filename</b> of the application's <glossary tag="main stack">main stack</glossary> might be "/Volumes/Disk/MyApp.app/Contents/MacOS/MyApp".</p>
  </description>
</doc>