<doc>
	<legacy_id>2200</legacy_id>
	<name>sheet</name>
	<type>command</type>

	<syntax>
		<example>sheet <i>stack</i> [in <i>parentStack</i>]</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Displays a <object tag="stack">stack</object> as a <glossary tag="sheet">sheet dialog box</glossary>.</summary>

	<examples>
<example>sheet stack "myFilePickerStack"</example>
<example>sheet me in stack "project1"</example>
	</examples>

	<history>
		<introduced version="2.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version="2.1">2.1</changed>
		<experimental version=""></experimental>
		<nonexperimental version=""></nonexperimental>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
	</platforms>

	<classes>
		<desktop/>
		<server/>
		<web/>
	</classes>

	<security>
	</security>


	<classification>
		<category>Windows &amp; Dialog Boxes</category>
	</classification>

	<references>
		<command tag="ask">ask Command</command>
		<command tag="modeless">modeless Command</command>
	</references>

	<description>Use the <b>sheet</b> <glossary tag="command">command</glossary> to display a <object tag="stack">stack</object> as a custom <command tag="sheet">sheet</command>.<p></p><p><b>Parameters:</b></p><p>The <i>stack</i> is any stack reference.</p><p></p><p>The <i>parentStack</i> is any open <object tag="stack">stack</object> that is not being displayed as a <command tag="sheet">sheet</command>.</p><p></p><p><b>Comments:</b></p><p>The <b>sheet</b> <glossary tag="command">command</glossary> opens the <object tag="stack">stack</object> as a <command tag="sheet">sheet</command> in the window of the specified <i>parentStack</i>. If you don't specify a <i>parentStack</i>, the <command tag="sheet">sheet</command> is displayed in the window of the <property tag="defaultStack">defaultStack</property>.</p><p></p><p>The <i>stack's</i> <keyword tag="rectangle">rectangle</keyword> and <property tag="location">location</property> <property tag="properties">properties</property> are ignored.</p><p></p><p>While a sheet dialog box is open, nothing else can be done in the stack the sheet is displayed in. Because of this, you should use sheets only when a stack must obtain feedback from the user before it can continue.</p><p></p><p>If the stack is already open, the <b>sheet</b> <glossary tag="command">command</glossary> closes the <object tag="stack">stack</object> and reopens it as a <command tag="sheet">sheet</command>, so <message tag="closeStack">closeStack</message> and <message tag="openStack">openStack</message>, <message tag="closeCard">closeCard</message> and <message tag="openCard">openCard</message>, and (if applicable) <message tag="closeBackground">closeBackground</message> and <message tag="openBackground">openBackground</message> <glossary tag="message">messages</glossary> are sent to the <i>parentStack's</i> <glossary tag="current card">current card</glossary> as a result of <glossary tag="execute">executing</glossary> this <glossary tag="command">command</glossary>. Use the <command tag="lock messages">lock messages</command> <glossary tag="command">command</glossary> before <glossary tag="execute">executing</glossary> <b>modal</b> if you want to prevent the close <glossary tag="message">messages</glossary> from being sent; the open <glossary tag="message">messages</glossary> are sent regardless of the setting of the <property tag="lockMessages">lockMessages</property> <glossary tag="property">property</glossary>.</p><p></p><p>The <b>sheet</b> <glossary tag="command">command</glossary> pauses the running <glossary tag="handler">handler</glossary> until the <command tag="sheet">sheet</command> is dismissed (usually by clicking a button in the <command tag="sheet">sheet</command>). To <constant tag="return">return</constant> information to the <glossary tag="handler">handler</glossary> about which <keyword tag="button">button</keyword> was clicked, in the <glossary tag="button">button's</glossary> <property tag="script">script</property>, set a <glossary tag="global">global variable</glossary> or <property tag="customProperties">custom property</property>. After the <glossary tag="dialog box">dialog box</glossary> is dismissed, the <glossary tag="handler">handler</glossary> can query this <glossary tag="variable">variable</glossary> or <glossary tag="property">property</glossary> and act accordingly.</p><p></p><p>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.</p><p></p><p></p><cp_note><glossary tag="sheet">Sheets</glossary> are only used on <glossary tag="OS X">OS X systems</glossary>. If you use the <b>sheet</b> <glossary tag="command">command</glossary> on a <glossary tag="Mac OS">Mac OS</glossary>, <glossary tag="Unix">Unix</glossary>, or <glossary tag="Windows">Windows system</glossary>, the <i>stack</i> is displayed as a <glossary tag="modal dialog box">modal dialog box</glossary> and the <i>parentStack</i> <glossary tag="parameter">parameter</glossary> is ignored.</cp_note><p></p><p></p><change><p>The ability to specify a <i>parentStack</i> was introduced in version 2.1. In previous versions, a <command tag="sheet">sheet</command> always appeared inside the <property tag="defaultStack">defaultStack</property>.</change></description>
</doc>