<doc>
  <legacy_id>2220</legacy_id>
  <name>answer folder</name>
  <type>command</type>
  <syntax>
    <example>answer folder <i>prompt</i> [with <i>defaultPath</i>] [as sheet]</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
    <synonym>answer directory</synonym>
  </synonyms>
  <classification>
    <category>Windows &amp; Dialog Boxes</category>
    <category>Files, Folders, &amp; Resources</category>
  </classification>
  <references>
    <command tag="revDeleteFolder">revDeleteFolder Command</command>
    <command tag="answer file">answer file Command</command>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
    <changed version="2.0"></changed>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <web/>
  </classes>
  <security>
    <disk access="???"/>
  </security>
  <summary>Displays a <glossary tag="file dialog box">standard file dialog</glossary> for the user to choose a <property tag="defaultFolder">folder</property>.</summary>
  <examples>
    <example>answer folder "Please choose a folder:"</example>
    <example>if it is empty then answer folder chooseMsg as sheet</example>
    <example>answer folder "Where is the data?" with "../data_stacks/recent"</example>
  </examples>
  <description>
    <p>Use the <b>answer folder</b> <glossary tag="command">command</glossary> when you want the user to choose a <property tag="defaultFolder">folder</property>--for example, as a destination for <glossary tag="export">exported</glossary> <function tag="files">files</function>.</p><p/><p><b>Parameters:</b></p><p>The <i>prompt</i> is a <keyword tag="string">string</keyword> (or any <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to a string). If you specify empty, no <i>prompt</i> appears.</p><p/><p>The <i>defaultPath</i> is the <glossary tag="file path">name and location</glossary> of the <property tag="defaultFolder">folder</property> whose contents are listed when the <glossary tag="dialog box">dialog box</glossary> appears. If no <i>defaultPath</i> is specified, the <glossary tag="dialog box">dialog box</glossary> lists the contents of the last folder you used with a <glossary tag="file dialog box">file dialog box</glossary>.</p><p/><p><b>Comments:</b></p><p>The absolute file path of the folder the user selects is placed in the <b>it</b> <glossary tag="variable">variable</glossary>. If the user cancels the <glossary tag="dialog box">dialog</glossary>, the <keyword tag="it">it</keyword> <glossary tag="variable">variable</glossary> is set to empty, and the <function tag="result">result</function> function <glossary tag="return">returns</glossary> "cancel".</p><p/><p>If the as sheet form is used, the dialog box appears as a sheet on OS X systems. On other systems, the as sheet form has no effect and the dialog box appears normally. Attempting to open a sheet from within another sheet displays the second <i>stack</i> as a <glossary tag="modal dialog box">modal dialog box</glossary> instead.  To give a dialog box a prompt when using the as sheet form a non-empty title must be provided.  This will cause the prompt to appear in the same place it would if as sheet was not being used.</p><p/><p>If the <b>systemFileSelector</b> <glossary tag="property">property</glossary> is set to false, LiveCode's built-in <glossary tag="dialog box">dialog box</glossary> is used instead of the operating system's <glossary tag="file dialog box">standard file dialog</glossary>.</p><p/><p><b>Changes:</b></p><p>The answer folder...as sheet form was introduced in version 2.0.</p>
  </description>
</doc>