<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hakkura: &#187; xml</title>
	<atom:link href="http://www.aterism.com/code/tag/xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aterism.com/code</link>
	<description>Of Code Snippets And Tutorials</description>
	<lastBuildDate>Tue, 01 Jun 2010 16:32:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>TiAppxml &#8211; Some Detail On Defaults</title>
		<link>http://www.aterism.com/code/2009/04/tiappxml/</link>
		<comments>http://www.aterism.com/code/2009/04/tiappxml/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 18:33:55 +0000</pubDate>
		<dc:creator>makkura</dc:creator>
				<category><![CDATA[Titanium]]></category>
		<category><![CDATA[Titanium Tutorials]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.aterism.com/code/?p=12</guid>
		<description><![CDATA[What&#8217;s this TiApp.xml you speak of? There hasn&#8217;t been much discussion of what&#8217;s in the tiapp.xml file since PR1 of Titanium. Since this file controls a lot of how your program starts up and acts initially, it is important to &#8230; <a href="http://www.aterism.com/code/2009/04/tiappxml/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>What&#8217;s this TiApp.xml you speak of?</h2>
<p>There hasn&#8217;t been much discussion of what&#8217;s in the tiapp.xml file since PR1 of Titanium.<br />
Since this file controls a lot of how your program starts up and acts initially, it is important to know what it does.<br />
The tiapp.xml file is generated automatically when your project is created via the Titanium Developer.<br />
It can, however, be edited manually after that.</p>
<p><span id="more-12"></span><br />
Here&#8217;s a sample tiapp.xml:</p>
<pre name="code" class="xml">
<?xml version='1.0' encoding='UTF-8'?>
<ti:app xmlns:ti='http://ti.appcelerator.org'>
<id>com.makkura.test_application_demo</id>
	<name>test_application_demo</name>
	<version>1.0</version>
<publisher>makkura</publisher>
	<url>www.aterism.com</url>
	<copyright>2009 by makkura</copyright>
	<window>
		<id>initial</id>

		<url>app://index.html</url>
		<width>700</width>
		<max-width>3000</max-width>
		<min-width>0</min-width>
		<height>800</height>
		<max-height>3000</max-height>
		<min-height>0</min-height>
		<fullscreen>false</fullscreen>
		<resizable>true</resizable>
		<chrome scrollbars="true">true</chrome>
		<maximizable>false</maximizable>
		<minimizable>false</minimizable>
		<closeable>true</closeable>
	</window>
</ti:app>
</pre>
<h2>The Details:</h2>
<p>Most of the code here is self explainitory.<br />
We&#8217;ll be going out of order a little in this explaination.<br />
The first couple lines set up the xml version and allow Titanium to parse it correctly.</p>
<h3>Publisher Information:</h3>
<p>The &lt;publisher&gt; tag gives the name of the publisher of the application. This is usually &#8216;you&#8217; or &#8216;your company&#8217;.<br />
The &lt;url&gt; tag gives the URL of the publisher.<br />
The &lt;name&gt;, &lt;publisher&gt;, and &lt;url&gt; tags cover the information about you, the publisher.</p>
<h3>Application Information:</h3>
<p>The &lt;id&gt; tag identifies your application.<br />
It follows the convention of &#8216;com.&lt;publisher&gt;.&lt;application_name&gt;&#8217;.<br />
Data on your program will be stored in a folder with that tag name.<br />
Windows: C:\Documents and Settings\All Users\Application Data\Titanium\appdata<br />
OS-X: /Library/Application Support/Titanium/appdata<br />
Linux: /TitaniumApp/appdata/</p>
<p>The &lt;version&gt; tag shows the version number of your program.<br />
It starts at 1.0 and is not changed automatically. If you keep this number up to date, it can help identify what version your users have and if they need updates.<br />
The &lt;copyright&gt; tag is filled with &lt;current_year&gt; by &lt;publisher&gt; on creation of the project.</p>
<h3>Window Information:</h3>
<p>The rest of the file specifies things about your application for when it opens.<br />
Notice these are all enclosed by the &lt;window&gt; tags.</p>
<h3>Identification:</h3>
<p>The &lt;id&gt; tag specifies the window name for the first application window.<br />
This is set by default to &#8216;initial&#8217;.<br />
Using the Titanium API you can refer to this window with Titanium.UI.windows["initial"] or Titanium.UI.windows[0].<br />
You can use either the id name or the index number to refer to your windows.</p>
<p>The &lt;title&gt; tag refers to the title that will be placed on the window.<br />
This is equivalent to the HTML &lt;title&gt; tag.</p>
<p>The &lt;url&gt; tag specifies what file is going to be opened as content for this window.<br />
It is set by default to &#8216;app://index.html&#8217;.<br />
&#8216;app://&#8217; points to your current project&#8217;s Resources folder so this is the same as &#8216;path/application/Resources/index.html&#8217;.<br />
In my example&#8217;s case that would be &#8216;/test_application_demo/Resources/index.html&#8217;.</p>
<h3>Size:</h3>
<p>The &lt;min-height&gt; and &lt;max-height&gt; tags control the minimum and maximum height of the window respectively.<br />
Similarly the &lt;min-width&gt; and &lt;max-width&gt; tags control the minimum and maximum width of the window.<br />
By default these are set to extreme values to not interefere with the application&#8217;s sizing.</p>
<p>The &lt;height&gt; and &lt;width&gt; tag assign the default size of the window when it opens.</p>
<p>If you need your window to conform to a specific size then these are the values you&#8217;ll need to edit.</p>
<h3>Control:</h3>
<p>The &lt;maximizable&gt;, &lt;minimizable&gt;, and &lt;closable&gt; tags handle the standard actions you expect from the Minimize, Maximize, and Close buttons in the corner of the title bar.<br />
These are all set to &#8216;true&#8217; by default.<br />
Any that are disabled will be &#8216;greyed out&#8217; and unusable.<br />
If they are all disabled then they will not appear on the title bar at all.<br />
(Greying out and being removed from the title bar completely may depend on the OS the application is run on.)</p>
<p>The &lt;fullscreen&gt; tag handles if the application is full screen or not.<br />
It is set to &#8216;false&#8217; by default.<br />
If it is set to &#8216;true&#8217; the application will take up the whole window and will not have the standard title bar and Minimize, Maximize, Close controls visible.</p>
<h3>Chrome:</h3>
<p>The &lt;chrome&gt; tag handles what custom chrome is available.<br />
It is set to &#8216;true&#8217; by default.<br />
If it is set to &#8216;false&#8217; the title bar will not appear.<br />
The &lt;chrome&gt; tag also contains a value &#8216;scrollbars=&#8221;true&#8221;&#8216;.  This value handles if there are usuable scrollbars if the content reaches far enough horizontally or vertically.<br />
If it is set to &#8216;false&#8217; there will be no scrollbars to use.</p>
<p>That covers everything in the TiApp.xml file by default.<br />
There may be additional fields used by the different OS builds or fields the developes have added but not used by default.<br />
I leave it to those more adventurous to handle those.</p>
<p>If you have additional fields that are specific to your OS in your tiapp.xml by default, please let me know and I will add in a refernce to them here.<br />
<em>~makkura</em><em></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aterism.com/code/2009/04/tiappxml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
