<?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="savedialog" module="max" category="Files">
	<digest>
		Open a dialog asking for a filename
	</digest>
	<description>
		Opens a file dialog for selection or entry of a filename to write. <o>savedialog</o> takes a list of one or more file types and allows you to save a file and choose a type for it.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Files
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				bang Shows Dialog, symbol(s) Set File Types
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				bang Shows Dialog, symbol(s) Set File Types
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Complete Path of Chosen Filename
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Type Code Chosen
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				bang When User Cancels
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="filetypes" optional="1" type="symbol">
			<digest>
				Sets one or more file types that will be displayed as choices for the user.
			</digest>
			<description>
				Sets one or more file types that will be displayed as choices for the user. The symbol <m>fold</m> specifies that the dialog box should let the user choose only folders.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Open a Save As dialog
			</digest>
			<description>
				Causes a standard <m>Save As</m> dialog box to appear, allowing the user to type in a filename and choose a folder location. The resulting location and filename are output as a symbol.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="filetype" optional="0" type="list" />
			</arglist>
			<digest>
				Set file types for dialog selection
			</digest>
			<description>
				One or more <link name="filetypes" module="core" type="vignette">four-letter filetype codes</link> sets the list of types displayed in the dialog box. Example type codes for files are <m>TEXT</m> for text files, <m>maxb</m> for Max binary format patcher files, and <m>AIFF</m> for AIFF format audio files. The symbol <m>fold</m> specifies that the dialog box should let the user choose only folders.
			</description>
		</method>
		<method name="name">
			<arglist>
				<arg name="filename" optional="0" type="symbol" />
			</arglist>
			<digest>
				Set default file name
			</digest>
			<description>
				The word <m>name</m>, followed by a symbol, specifies a default file name.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="filetype" optional="0" type="list" />
			</arglist>
			<digest>
				Set file types for dialog selection
			</digest>
			<description>
				The word <m>set</m>, followed by a <link name="filetypes" module="core" type="vignette">four-letter filetype codes</link>, sets the <o>savedialog</o> object to display the desired file type without opening the dialog box. The chosen file type is sent out the middle outlet when the user chooses Save in the dialog box.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="savedialog.png" caption="Select a folder or a specific file type for file saving" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="conformpath" />
		<seealso name="dialog" />
		<seealso name="filedate" />
		<seealso name="filein" />
		<seealso name="filepath" />
		<seealso name="opendialog" />
	</seealsolist>
	<discussion>
		To choose a folder, use the &quot;fold&quot; type. <o>savedialog</o> reports the entire pathname of the file or folder chosen, which can be passed to any Max object after the word <m>write</m> or <m>save</m>.
	</discussion>
	<misc name="Output">
		<entry name="symbol">
			<description>
				Out left outlet: The absolute pathname of the file as a symbol. The output pathnames contain slash separators.
				<br />
				<br />
				Absolute pathnames look like this:
				<br />
				<br />
				<m>&quot;C:/Max Folder/extras/mystuff/mypatch.pat&quot;</m> 				<br />
				<br />
				The <o>conformpath</o> object can be used to convert paths of one pathtype and/or pathstyle to another.
			</description>
		</entry>
		<entry name="symbol">
			<description>
				Out middle outlet: The <link name="filetypes" module="core" type="vignette">four-letter filetype code</link> which specifies the filetype currently selected.
			</description>
		</entry>
		<entry name="bang">
			<description>
				Out right outlet: If the user chooses Cancel in the dialog box, a bang is sent out.
			</description>
		</entry>
	</misc>
</c74object>
