<doc>
	<legacy_id>1577</legacy_id>
	<name>ask</name>
	<type>command</type>

	<syntax>
		<example>ask [<i>iconType</i>] <i>question</i> [with <i>defaultResponse</i>] [titled <i>windowTitle</i>] [as sheet]</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Displays a <glossary tag="dialog box">dialog box</glossary> with a question, a text box for the user to enter a response, and OK and Cancel buttons.</summary>

	<examples>
<example>ask &quot;What is your name?&quot;</example>
<example>ask &quot;Please enter your occupation:&quot; with &quot;Geek&quot;</example>
<example><p>ask field &quot;Prompt&quot; with firstGuess titled &quot;Guess!&quot;</p></example>
<example>ask myPrompt as sheet</example>
<example>ask &quot;Please say hello:&quot; with &quot;DEFAULT&quot; titled &quot;Hello World&quot;</example>
	</examples>

	<history>
		<introduced version="1.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version="4.6.1">Added Support for Android.</changed>
<changed version="2.0">2.0</changed>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
		<ios/>
		<android/>
	</platforms>

	<classes>
		<desktop/>
		<web/>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
	</classification>

	<references>
		<command tag="ask file with type">ask file with type Command</command>
		<command tag="answer">answer Command</command>
		<command tag="ask file">ask file Command</command>
		<command tag="ask password">ask password Command</command>
		<command tag="modal">modal Command</command>
		<command tag="sheet">sheet Command</command>
		<property tag="dialogData">dialogData Property</property>
		<keyword tag="gRevAppIcon">gRevAppIcon Keyword</keyword>
		<keyword tag="gRevSmallAppIcon">gRevSmallAppIcon Keyword</keyword>
		<keyword tag="gRevProfileReadOnly">gRevProfileReadOnly Keyword</keyword>
	</references>

	<description>
	<overview>Use the <b>ask</b> <glossary tag="command">command</glossary> when a <glossary tag="handler">handler</glossary> needs to get information from the user before continuing.</overview>

		<parameters>
  <parameter>
    <name>iconType</name>
    <description>Is the icon that is displayed on the left side of the dialog box. If you do not specify an icon, none is displayed. iOS and Android do not support iconType. The following types are supported:</description>
    <options title="">
      <option>
        <item>information</item>
        <description/>
      </option>
      <option>
        <item>question</item>
        <description/>
      </option>
      <option>
        <item>error</item>
        <description/>
      </option>
      <option>
        <item>warning</item>
        <description/>
      </option>
    </options>
  </parameter>
  <parameter>
    <name>question</name>
    <description>Is a string of formatted (or unformated) text.</description>
  </parameter>
  <parameter>
    <name>defaultResponse</name>
    <description>Is a string, and is placed in the text box when the dialog box appears. If no defaultResponse is specified, the text box is empty when the dialog box appears.</description>
  </parameter>
  <parameter>
    <name>windowTitle</name>
    <description>Appears in the title bar of the dialog box. If no windowTitle is given, the title bar is blank.</description>
  </parameter>		</parameters>

	<value></value>
	<comments>The contents of the text box 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> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> &quot;cancel&quot;.<p></p><p>If the ask...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.</p><p></p><p></p><cp_note>On <glossary tag="OS X">OS X systems</glossary>, there is no image for the question icon. Therefore, the information icon appears instead. In addition, the image specified by the <keyword tag="gRevAppIcon">gRevAppIcon keyword</keyword> appears if you do not specify an <i>iconType</i>. If you specify an <i>iconType,</i> the image specified by the <keyword tag="gRevSmallAppIcon">gRevSmallAppIcon keyword</keyword> appears instead, along with the standard icon specified by the <i>iconType</i>. </cp_note><p></p><p></p><cp_note>Mobile does not support <i>iconType</i> and 'as sheet'.</cp_note><p></p><p></p><change><p>The ability to specify an <i>iconType</i> was added in version 2.0. In previous versions, no icon was displayed.</change><p>The ask...as sheet form was introduced in version 2.0.</p><p>The ability to provide formatted text for the <i>prompt</i> was introduced in version 2.0.</p></comments>
	</description>
</doc>