<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to restart an AIR application from code</title>
	<atom:link href="http://www.hufkens.net/2009/03/how-to-restart-an-air-application-from-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hufkens.net/2009/03/how-to-restart-an-air-application-from-code/</link>
	<description>{Rich Interactive Applications Developer}</description>
	<lastBuildDate>Tue, 09 Mar 2010 16:05:04 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: lee</title>
		<link>http://www.hufkens.net/2009/03/how-to-restart-an-air-application-from-code/comment-page-1/#comment-368</link>
		<dc:creator>lee</dc:creator>
		<pubDate>Mon, 22 Jun 2009 20:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.hufkens.net/?p=447#comment-368</guid>
		<description>I just noticed the flashlog is catching many Error #2044 when it closes.</description>
		<content:encoded><![CDATA[<p>I just noticed the flashlog is catching many Error #2044 when it closes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lee</title>
		<link>http://www.hufkens.net/2009/03/how-to-restart-an-air-application-from-code/comment-page-1/#comment-367</link>
		<dc:creator>lee</dc:creator>
		<pubDate>Mon, 22 Jun 2009 20:19:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.hufkens.net/?p=447#comment-367</guid>
		<description>Do you know where the ProductManager class is from?  I can&#039;t find documentation of it on livedocs.</description>
		<content:encoded><![CDATA[<p>Do you know where the ProductManager class is from?  I can&#8217;t find documentation of it on livedocs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lee</title>
		<link>http://www.hufkens.net/2009/03/how-to-restart-an-air-application-from-code/comment-page-1/#comment-366</link>
		<dc:creator>lee</dc:creator>
		<pubDate>Mon, 22 Jun 2009 20:08:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.hufkens.net/?p=447#comment-366</guid>
		<description>I&#039;m on a mac, I wonder if that has anything to do with it.  Which OS are you having success with?</description>
		<content:encoded><![CDATA[<p>I&#8217;m on a mac, I wonder if that has anything to do with it.  Which OS are you having success with?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lee</title>
		<link>http://www.hufkens.net/2009/03/how-to-restart-an-air-application-from-code/comment-page-1/#comment-365</link>
		<dc:creator>lee</dc:creator>
		<pubDate>Mon, 22 Jun 2009 20:04:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.hufkens.net/?p=447#comment-365</guid>
		<description>Hey Alain,

Yes, allowBrowserInvocation is set to true in the descriptor XML, I even checked the application&#039;s Package Contents to verify, and I&#039;ve been testing with the installed app.  I&#039;ve found the swc that contains the mx.core.WindowedApplication class, (it seems to be the air/airframework.swc in the flex SDK), unfortunately I haven&#039;t been able to compile from Flash CS4 with it.  Dependencies seem to be in conflict.</description>
		<content:encoded><![CDATA[<p>Hey Alain,</p>
<p>Yes, allowBrowserInvocation is set to true in the descriptor XML, I even checked the application&#8217;s Package Contents to verify, and I&#8217;ve been testing with the installed app.  I&#8217;ve found the swc that contains the mx.core.WindowedApplication class, (it seems to be the air/airframework.swc in the flex SDK), unfortunately I haven&#8217;t been able to compile from Flash CS4 with it.  Dependencies seem to be in conflict.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alain</title>
		<link>http://www.hufkens.net/2009/03/how-to-restart-an-air-application-from-code/comment-page-1/#comment-364</link>
		<dc:creator>Alain</dc:creator>
		<pubDate>Mon, 22 Jun 2009 19:54:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.hufkens.net/?p=447#comment-364</guid>
		<description>Hey Lee,

Did you make sure that the “allowBrowserInvocation” option is set to true in the AIR application descriptor template. This is the xml file that describes the version, name, ... of your application. Because otherwise it will not work.

It also doesn&#039;t work in debug when you run it for example from Flex Builder. It only works if you installed the app. In debug the application that executes your AIR program is adl.exe.

Hope this helps,
Alain</description>
		<content:encoded><![CDATA[<p>Hey Lee,</p>
<p>Did you make sure that the “allowBrowserInvocation” option is set to true in the AIR application descriptor template. This is the xml file that describes the version, name, &#8230; of your application. Because otherwise it will not work.</p>
<p>It also doesn&#8217;t work in debug when you run it for example from Flex Builder. It only works if you installed the app. In debug the application that executes your AIR program is adl.exe.</p>
<p>Hope this helps,<br />
Alain</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lee</title>
		<link>http://www.hufkens.net/2009/03/how-to-restart-an-air-application-from-code/comment-page-1/#comment-363</link>
		<dc:creator>lee</dc:creator>
		<pubDate>Mon, 22 Jun 2009 19:00:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.hufkens.net/?p=447#comment-363</guid>
		<description>Unfortunately I don&#039;t think it will work with a non-Flex app, without the WindowedApplication class.  Attempts at using the WindowedApplication class from Flash are resulting in a number of import errors, even with the Flex SDK swc files included in the library path.  When attempting to use what I would think are the air equivalents, the application simply closes without restarting.

    import adobe.utils.ProductManager;

    var mgr:ProductManager = 
        new ProductManager(&quot;airappinstaller&quot;);
    
    mgr.launch(&quot;-launch &quot; +
        NativeApplication.nativeApplication.applicationID + &quot; &quot; +
        NativeApplication.nativeApplication.publisherID);
    
    stage.nativeWindow.close();</description>
		<content:encoded><![CDATA[<p>Unfortunately I don&#8217;t think it will work with a non-Flex app, without the WindowedApplication class.  Attempts at using the WindowedApplication class from Flash are resulting in a number of import errors, even with the Flex SDK swc files included in the library path.  When attempting to use what I would think are the air equivalents, the application simply closes without restarting.</p>
<p>    import adobe.utils.ProductManager;</p>
<p>    var mgr:ProductManager =<br />
        new ProductManager(&#8220;airappinstaller&#8221;);</p>
<p>    mgr.launch(&#8220;-launch &#8221; +<br />
        NativeApplication.nativeApplication.applicationID + &#8221; &#8221; +<br />
        NativeApplication.nativeApplication.publisherID);</p>
<p>    stage.nativeWindow.close();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alain</title>
		<link>http://www.hufkens.net/2009/03/how-to-restart-an-air-application-from-code/comment-page-1/#comment-133</link>
		<dc:creator>Alain</dc:creator>
		<pubDate>Wed, 22 Apr 2009 18:01:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.hufkens.net/?p=447#comment-133</guid>
		<description>Hey Lee,

The code provided in the blog post works for me. But it is used in a Flex application. You can see that the &lt;em&gt;Application&lt;/em&gt; class is located in the &lt;em&gt;mx.core&lt;/em&gt; namespace. If you have a non-Flex AIR application this namespace is not available and you will need the &lt;em&gt;NativeApplication&lt;/em&gt; class which is located in the &lt;em&gt;flash.desktop&lt;/em&gt; namespace.

I haven&#039;t tried it, but I suppose it should also work.</description>
		<content:encoded><![CDATA[<p>Hey Lee,</p>
<p>The code provided in the blog post works for me. But it is used in a Flex application. You can see that the <em>Application</em> class is located in the <em>mx.core</em> namespace. If you have a non-Flex AIR application this namespace is not available and you will need the <em>NativeApplication</em> class which is located in the <em>flash.desktop</em> namespace.</p>
<p>I haven&#8217;t tried it, but I suppose it should also work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lee</title>
		<link>http://www.hufkens.net/2009/03/how-to-restart-an-air-application-from-code/comment-page-1/#comment-132</link>
		<dc:creator>lee</dc:creator>
		<pubDate>Tue, 21 Apr 2009 23:35:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.hufkens.net/?p=447#comment-132</guid>
		<description>Is, &quot;var app:WindowedApplication = WindowedApplication(Application.application)&quot; supposed to be, &quot;    var app:WindowedApplication = WindowedApplication(NativeApplication.nativeApplication)&quot;?</description>
		<content:encoded><![CDATA[<p>Is, &#8220;var app:WindowedApplication = WindowedApplication(Application.application)&#8221; supposed to be, &#8221;    var app:WindowedApplication = WindowedApplication(NativeApplication.nativeApplication)&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam McCrossan</title>
		<link>http://www.hufkens.net/2009/03/how-to-restart-an-air-application-from-code/comment-page-1/#comment-127</link>
		<dc:creator>Adam McCrossan</dc:creator>
		<pubDate>Tue, 21 Apr 2009 11:33:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.hufkens.net/?p=447#comment-127</guid>
		<description>Fantastic!

Thank you so much.

Adam McCrossan</description>
		<content:encoded><![CDATA[<p>Fantastic!</p>
<p>Thank you so much.</p>
<p>Adam McCrossan</p>
]]></content:encoded>
	</item>
</channel>
</rss>
