<?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="text" module="max" category="Data">
	<digest>
		Format messages as a text file
	</digest>
	<description>
		Collects and formats incoming messages as text to be output as lines of text.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Data
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Incoming Numbers or Symbols to be Collected
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Incoming Numbers or Symbols to be Collected
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Text Output By line Message
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				bang When Read Completed
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				query result (number of lines)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="filename" optional="0" type="symbol">
			<digest>
				Text file name
			</digest>
			<description>
				Names a text file to be read in when the object is loaded.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Store integer as text
			</digest>
			<description>
				Stores the integer within <o>text</o>.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Store float as text
			</digest>
			<description>
				Stores the float within <o>text</o>.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Store list elements as text
			</digest>
			<description>
				Stores the list within <o>text</o>.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Store message elements as text
			</digest>
			<description>
				The message is stored in the <o>text</o> object, placed after any previously stored messages, and is followed by a space.
			</description>
		</method>
		<method name="clear">
			<arglist />
			<digest>
				Clear all text
			</digest>
			<description>
				Erases the contents of <o>text</o>.
			</description>
		</method>
		<method name="cr">
			<arglist />
			<digest>
				Start a new line
			</digest>
			<description>
				Puts a carriage return at the end of the contents of <o>text</o>, to start a new line. If the last character in <o>text</o> is a space, the carriage return replaces that space.
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Open text editing window
			</digest>
			<description>
				Double-clicking with the mouse on the <o>text</o> object (when the patcher window is locked) opens an editing window in which the contents of text can be viewed and edited. The <o>text</o> object ignores messages to change its text while the editing window is open. Unlike the <o>capture</o> object, changes made in the editing window of <o>text</o> actually alter the contents of the object.
			</description>
		</method>
		<method name="dump">
			<arglist />
			<digest>
				Output all text
			</digest>
			<description>
				The word <m>dump</m> causes <o>text</o> to send its contents out of the object's left outlet.
			</description>
		</method>
		<method name="editwith">
			<arglist>
				<arg name="editor" optional="0" type="symbol" />
			</arglist>
			<digest>
				Use external text editor
			</digest>
			<description>
				The word <m>editwith</m>, followed by a symbol that specifies a text editor, will open the file for editing using the specified editor.
			</description>
		</method>
		<method name="filetype">
			<arglist>
				<arg name="filetype-code (four letters)" optional="0" type="symbol" />
			</arglist>
			<digest>
				Set available file types
			</digest>
			<description>
				The word <m>filetype</m>, followed by a symbol, sets the file types which can be read and written into the <o>text</o> object. File types are specified using the standard <link name="filetypes" module="core" type="vignette">four-letter filetype code</link> (e.g. filetype ffoo). The message <m>filetype</m> with no arguments restores the default file behavior -- either Max binary or text file formats. File types are mapped to filename extensions on Windows based on the messages to max contained in the file max-fileformats.txt in the init folder, which is loaded on startup. If you are defining your own filetype, you may want to include your own text file in the init folder in order to specify a mapping between an extension and your four-letter type code.
			</description>
		</method>
		<method name="line">
			<arglist>
				<arg name="index" optional="0" type="int" />
			</arglist>
			<digest>
				Output a text line
			</digest>
			<description>
				The word <m>line</m>, followed by a number, causes <o>text</o> to send out the contents of that line number (up to 256 characters) with the word <m>set</m> prepended (for setting the contents of a <o>message</o> box). Lines are numbered beginning with 1; any line number message less than 1 is converted to <m>line 1</m>. If a nonexistent line number is requested, nothing is sent out.
			</description>
		</method>
		<method name="open">
			<arglist />
			<digest>
				Open text editing window
			</digest>
			<description>
				Opens the object's text window for editing. Double-clicking on the <o>text</o> object in a locked patcher has the same effect. The <o>text</o> object ignores messages to change its text while the editing window is open. Unlike the <o>capture</o> object, changes made in the editing window of <o>text</o> actually alter the contents of the object.
			</description>
		</method>
		<method name="read">
			<arglist>
				<arg name="filename" optional="0" type="symbol" />
			</arglist>
			<digest>
				Read in a text file
			</digest>
			<description>
				The word <m>read</m>, followed by a symbol that specifies a filename, will read the contents of a text file. If no filename or pathname is specified, the <m>read</m> message will call up the standard Open Document dialog box, so that a text file can be specified. Use the filetype message to use a custom filetype with this object.
			</description>
		</method>
		<method name="query">
			<arglist />
			<digest>
				Report number of lines
			</digest>
			<description>
				The word <m>query</m> sends a number that specifies the number of lines stored in the <o>text</o> object out the object's right outlet.
			</description>
		</method>
		<method name="t_symbol">
			<arglist>
				<arg name="input" optional="0" type="symbol" />
			</arglist>
			<digest>
				Store symbol as text
			</digest>
			<description>
				Stores the symbol within <o>text</o>.
			</description>
		</method>
		<method name="tab">
			<arglist />
			<digest>
				Place a tab character in the text
			</digest>
			<description>
				Puts a tab stop at the end of the contents of <o>text</o>. If the last character in <o>text</o> is a space, the tab stop replaces that space.
			</description>
		</method>
		<method name="settitle">
			<arglist>
				<arg name="window-name" optional="0" type="symbol" />
			</arglist>
			<digest>
				Set text editing window title
			</digest>
			<description>
				The word <m>settitle</m>, followed by any word, sets the title of the text window. If you want more than one word to appear as the default text, you must enclose the words in double quotes or precede the spaces with a backslash (<m>\</m>).
			</description>
		</method>
		<method name="symbol">
			<arglist>
				<arg name="any symbol" optional="0" type="symbol" />
			</arglist>
			<digest>
				Store symbol as text
			</digest>
			<description>
				The word <m>symbol</m>, followed by any word, stores that word at the end of the contents of <o>text</o>. This is useful if you want to store a word that would otherwise be understood as a specific message by <o>text</o>. For example, <m>symbol clear</m> stores the word <m>clear</m>, followed by a space, at the end of the contents of <o>text</o>, rather than erasing the contents.
			</description>
		</method>
		<method name="wclose">
			<arglist />
			<digest>
				Close text editing window
			</digest>
			<description>
				Closes the window associated with the <o>text</o> object.
			</description>
		</method>
		<method name="write">
			<arglist>
				<arg name="filename" optional="0" type="symbol" />
			</arglist>
			<digest>
				Write out a text file
			</digest>
			<description>
				The word <m>write</m>, followed by a symbol that specifies a filename, will save the contents of <o>text</o> as a text file in the current default folder unless the file is specified with an absolute pathname. If no filename or pathname is specified, the <m>write</m> message will open up a standard Save As dialog box, so that the contents of <o>text</o> can be saved in a separate text file. Use the filetype message to use a custom filetype with this object.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="precision" get="1" set="1" type="int" size="1">
			<digest>
				Float Precision
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Float Precision" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="text.png" caption="Collect messages as text, to paste elsewhere or to save as a separate file" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="capture" />
		<seealso name="filein" />
		<seealso name="itable" />
		<seealso name="spell" />
		<seealso name="sprintf" />
		<seealso name="table" />
		<seealso name="textedit" />
	</seealsolist>
	<misc name="Output">
		<entry name="symbol">
			<description>
				Out left outlet: When a <m>line</m> message is received, the text of the specified line number is sent out preceded by the word <m>set</m>. The message can be used to set the contents of a <o>message</o> box (or can be sent to any other object for which that particular <m>set</m> message is appropriate).
			</description>
		</entry>
		<entry name="bang">
			<description>
				Out middle outlet: When a file has finished loading in response to a <m>read</m> message, a <m>bang</m> is sent out the middle outlet.
			</description>
		</entry>
		<entry name="int">
			<description>
				Out right outlet: In response to a <m>query</m> message, a number corresponding to the number of lines of text stored in the <o>text</o> object is sent out the right outlet.
			</description>
		</entry>
	</misc>
</c74object>
