<?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>David Flatley &#187; beta 3</title>
	<atom:link href="http://www.davidflatley.com/tag/beta-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davidflatley.com</link>
	<description>A RIA developer's late night ramblings and other nonsense</description>
	<lastBuildDate>Mon, 22 Mar 2010 15:04:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Adobe AIR Beta 3 &#8211; descriptor file porting</title>
		<link>http://www.davidflatley.com/2007/12/13/adobe-air-beta-3-descriptor-file-porting/</link>
		<comments>http://www.davidflatley.com/2007/12/13/adobe-air-beta-3-descriptor-file-porting/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 02:35:38 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[adobe air]]></category>
		<category><![CDATA[airspace]]></category>
		<category><![CDATA[beta 2]]></category>
		<category><![CDATA[beta 3]]></category>
		<category><![CDATA[PXL Designs]]></category>

		<guid isPermaLink="false">http://www.davidflatley.com/?p=19</guid>
		<description><![CDATA[I ported AirSpace today from AIR Beta 2 to Beta 3 and overall it wasn&#8217;t that bad. Heh! First off, I originally used Rich Tretola&#8217;s UpdateManager class for AirSpace&#8217;s updates before, and it looks like he updated his entry for Beta 3 already. Wish I knew this before I upgraded mine Oh well, it&#8217;s done [...]]]></description>
			<content:encoded><![CDATA[<p><!-- google_ad_section_start -->I ported <a href="http://www.airspaceprofile.com">AirSpace</a> today from AIR Beta 2 to Beta 3 and overall it wasn&#8217;t that bad. Heh! First off, I originally used <a href="http://blog.everythingflex.com/2007/10/01/air-update-manager/">Rich Tretola&#8217;s UpdateManager class </a>for AirSpace&#8217;s updates before, and it looks like he updated his entry for Beta 3 already. Wish I knew this before I upgraded mine <img src='http://www.davidflatley.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  Oh well, it&#8217;s done now. If you want a cool way to update your apps, that one works like a charm.</p>
<p>Nothing massive changed, its all pretty easy, but rather than chase all the new stuff down, I figured I&#8217;d post in case someone else runs into issues.</p>
<p>The first issue I had, was to remove references to Shell.shell and replace with nativeWindow inside the ActionScript. At least that&#8217;s one thing the new compiler was griping about and is now fixed. Referencing the application descriptor file from within the code had a few minor changes. The first thing I did after installing Beta 3 for AIR and Flex 3, was just create a new AIR project for AirSpace. That way, I had a new descriptor file to play with and seemed easier than chasing down any artifacts in the old one.<!-- google_ad_section_end --></p>
<p><span id="more-19"></span></p>
<p>I had the version number and appID in the OLD descriptor file (Beta 2) right at the root node:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;application appid=<span style="color: #ff0000;">&quot;AirSpace&quot;</span> version=<span style="color: #ff0000;">&quot;1.0.0.5&quot;</span> xmlns=<span style="color: #ff0000;">&quot;http://ns.adobe.com/air/application/1.0.M4&quot;</span><span style="color: #7400FF;">&gt;</span>&lt;/application<span style="color: #7400FF;">&gt;</span></span></pre></td></tr></table></div>

<p>In the new descriptor file, it&#8217;s laid out differently. I just put it all in together like so:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;id<span style="color: #7400FF;">&gt;</span></span>com.pxldesigns.airspace <span style="color: #000000;">&lt;/id<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;">&lt;filename<span style="color: #7400FF;">&gt;</span></span>AirSpace <span style="color: #000000;">&lt;/filename<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;">&lt;name<span style="color: #7400FF;">&gt;</span></span>AirSpace<span style="color: #000000;">&lt;/name<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;">&lt;version<span style="color: #7400FF;">&gt;</span></span>1.0.1.5<span style="color: #000000;">&lt;/version<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;">&lt;description<span style="color: #7400FF;">&gt;</span></span>AirSpace is a MySpace Style Editor created with Adobe AIR <span style="color: #000000;">&lt;/description<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;">&lt;copyright<span style="color: #7400FF;">&gt;</span></span>PXL Designs, LLC<span style="color: #000000;">&lt;/copyright<span style="color: #7400FF;">&gt;</span></span></pre></td></tr></table></div>

<p>Big deal, right? So then I was no longer getting errors when trying to build the release version with my nifty self signed certificate, the one that warns people going to install it that I could have built a horrible nasty app that pops up ads 24-7 and eats up all the ram. Ha, kidding! I wouldn&#8217;t build such a thing&#8230;mental note.</p>
<p>Referencing the new app version from inside the MXML or ActionScript is slightly different, and I use this in a few places for AirSpace. Still no biggy, like I said, it would have saved some time if I remembered to check Rich&#8217;s code first, none the less, I figured it out quick enough.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> appXml:<span style="color: #0066CC;">XML</span> = NativeApplication.<span style="color: #006600;">nativeApplication</span>.<span style="color: #006600;">applicationDescriptor</span>;
<span style="color: #808080; font-style: italic;">// use of name space from the descriptor file</span>
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> ns:Namespace = appXml.<span style="color: #006600;">namespace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> currentVersion:<span style="color: #0066CC;">String</span> = appXml.<span style="color: #006600;">ns</span>::<span style="color: #0066CC;">version</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>; <span style="color: #808080; font-style: italic;">// &lt;version&gt;&lt;/version&gt; in the app descriptor</span></pre></td></tr></table></div>

<p>Next step, Shell.shell.exit(); became nativeWindow.close(); now. The compiler no longer liked references to Shell.shell, so that fixed my problem.</p>
<p>I thought I&#8217;d need to change some File refs because the compiler tossed up errors at first for this line:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> file:File = File.<span style="color: #006600;">applicationDirectory</span>.<span style="color: #006600;">resolvePath</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;index.html&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>but after running &#8220;Project &#8211;&gt; Clean..&#8221; a few times, the compiler stopped griping. Dunno about that one yet, it works fine for me, I haven&#8217;t had time to check if there&#8217;s any massive changes with files and directories yet again, but after cleaning this wasn&#8217;t an issue for me anymore.</p>
<p>The only thing that gave me a headache was resigning my certificate and getting that up and running again. After &#8220;cleaning&#8221; a few zillion times, and creating the new app descriptor file, I created a new certificate by opening a command prompt, changing directories to &#8220;C:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0\bin&#8221; and running the ole adt command:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;">adt -certificate -cn yourCertName <span style="color: #cc66cc;">1024</span>-RSA ..<span style="color: #66cc66;">/</span>newCertName.<span style="color: #006600;">pfx</span> yourCertPassword</pre></td></tr></table></div>

<p>Then packaged everything right in FlexBuilder 3 &#8220;Project &#8211;&gt; Export Release Build&#8221; and browsing for the new cert, and entering the password. Whoopie, done!</p>
<p>The moral of this story? First, always check Rich&#8217;s blog before making a move <img src='http://www.davidflatley.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  save yourself the trouble of porting to Beta 3 by just creating a new AIR project (complete with new descriptor file) import your files, update your new desriptor file and pop out your self signed cert to notify the world that you haven&#8217;t yet purchased a Thawte cert like me because I&#8217;m too cheap.</p>
<p></p>

<!-- start wp-tags-to-technorati 1.01 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/adobe' rel='tag' target='_self'>adobe</a>, <a class='technorati-link' href='http://technorati.com/tag/adobe+air' rel='tag' target='_self'>adobe air</a>, <a class='technorati-link' href='http://technorati.com/tag/airspace' rel='tag' target='_self'>airspace</a>, <a class='technorati-link' href='http://technorati.com/tag/beta+2' rel='tag' target='_self'>beta 2</a>, <a class='technorati-link' href='http://technorati.com/tag/beta+3' rel='tag' target='_self'>beta 3</a>, <a class='technorati-link' href='http://technorati.com/tag/PXL+Designs' rel='tag' target='_self'>PXL Designs</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.davidflatley.com/2007/12/13/adobe-air-beta-3-descriptor-file-porting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
