<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="dialog" module="max" category="Interaction">
	<digest>
		Open a dialog box for text entry
	</digest>
	<description>
		Allows entry of a symbol (as text) and sends it out the outlet when you click on the OK button in the dialog box.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Interaction
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Show Dialog for Data Entry
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				0 Sets Output as Symbol, 1 as List/Message
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Text Entered in Dialog
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				bang When User Cancels
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="label" optional="1" type="symbol">
			<digest>
				The dialog window label
			</digest>
			<description>
				Sets the prompt which will appear above the text entry box in the dialog window.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Prompt for text entry with default
			</digest>
			<description>
				In left inlet: Opens the dialog box with the previous text displayed as the default.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="text" optional="0" type="int" />
			</arglist>
			<digest>
				Prompt for text entry with default
			</digest>
			<description>
				See the <m>symbol</m> entry.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="text" optional="0" type="float" />
			</arglist>
			<digest>
				Prompt for text entry with default
			</digest>
			<description>
				In left inlet: Same as <m>symbol</m>.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="output-mode" optional="0" type="int" />
			</arglist>
			<digest>
				Set output mode
			</digest>
			<description>
				In right inlet: The number <m>0</m> sets <o>dialog</o> so that whatever the user types into the dialog box is sent out as a symbol preceded by the word <m>symbol</m>. A non-zero number sets <o>dialog</o> so that the typed-in text is sent out exactly as is if it begins with a word, or preceded by the word <m>list</m> if it begins with a number. If no number is received, it is considered <m>0</m> by default.
			</description>
		</method>
		<method name="symbol">
			<arglist>
				<arg name="text" optional="0" type="symbol" />
			</arglist>
			<digest>
				Prompt for text entry with default
			</digest>
			<description>
				In left inlet: The word <m>symbol</m>, followed by any word, opens a dialog box prompting the user to enter text. The word following <m>symbol</m> is shown as the default text. If you want more than one word to appear as the default text, you must enclose the words in double quotes.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="dialog.png" caption="Typed-in message is sent out when OK button is clicked other processes continue while dialog box is open A dialog box is opened by the dialog object" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="message" />
		<seealso name="opendialog" />
		<seealso name="savedialog" />
		<seealso name="sprintf" />
	</seealsolist>
	<discussion>
		Note that the output of a dialog object is not directly &quot;caused&quot; by sending the object a message, so you can't count on it happening by a certain time.
	</discussion>
	<misc name="Output">
		<entry name="symbol">
			<description>
				If the user clicks OK, <o>dialog</o> makes a symbol out of the entered text (even if it's a number or it's more than one word) and sends it out its outlet with the word <m>symbol</m> prepended. If a non-zero number has been received in the right inlet, the typed-in message is sent out as is (without being preceded by the word <m>symbol</m>). This message can be displayed by prepending the word <m>set</m> and sending it to a <o>message</o> box (as shown in the example). If the user clicks Cancel, nothing is sent out.
				<br />
				<br />
				Since your patch continues to run while waiting for the user to type text into your dialog box, you can't count on getting the typed-in symbol immediately after sending the message that opens the dialog box.
			</description>
		</entry>
		<entry name="bang">
			<description>
				If the dialog box is cancelled by the user, a <m>bang</m> message is sent out the right outlet.
			</description>
		</entry>
	</misc>
</c74object>
