<?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>WS-Blog &#187; AIR</title>
	<atom:link href="http://www.websector.de/blog/category/air/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.websector.de/blog</link>
	<description>// Flex, AIR, Flash</description>
	<lastBuildDate>Wed, 16 Jun 2010 09:25:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Custom ApplicationUpdaterUI for using AIR Update Framework in Flex 4</title>
		<link>http://www.websector.de/blog/2009/09/09/custom-applicationupdaterui-for-using-air-updater-framework-in-flex-4/</link>
		<comments>http://www.websector.de/blog/2009/09/09/custom-applicationupdaterui-for-using-air-updater-framework-in-flex-4/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 17:25:54 +0000</pubDate>
		<dc:creator>sectore</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.websector.de/blog/?p=403</guid>
		<description><![CDATA[Flex 4 is Rock &#8216;n&#8217; Roll! However, Flex 4 is still beta and it can&#8217;t be perfect right now. Today one of the most missing feature for me is using the ApplicationUpdaterUI of the Adobe AIR Update Framework in Flex 4. This bug is already documented. (BTW: Please vote here to fix this issue! ) [...]]]></description>
			<content:encoded><![CDATA[<p>Flex 4 is Rock &#8216;n&#8217; Roll! However, Flex 4 is still beta and it can&#8217;t be perfect right now. Today one of the <a href="http://twitter.com/sectore/status/3513712009">most missing feature for me</a> is using the ApplicationUpdaterUI of the <a href="http://labs.adobe.com/wiki/index.php/Adobe_AIR_Update_Framework">Adobe AIR Update Framework</a> in Flex 4. <a href="http://bugs.adobe.com/jira/browse/SDK-22886?rc=1">This bug</a> is already documented. (BTW: <a href="http://bugs.adobe.com/jira/browse/SDK-22886?rc=1">Please vote here</a> to fix this issue! )</p>
<p>Anyway, I can&#8217;t wait for the final release of Flex 4, so I decided to build a <a href="http://github.com/sectore/applicationupdaterui/">custom ApplicationUpdaterUI component</a> based on the new <a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Skinning">Spark skinning architecture</a>. The custom  ApplicationUpdaterUI is built on the top of the current version of Adobes AIR Update Framework and most of the current features are available (e.g. auto check, localization etc.) The component is full skinnable using it as an external window (as before) or as an embedded view component in an application (without the need of a popup window). </p>
<p><span id="more-403"></span></p>
<h2>Usage</h2>
<phpcode>
<div class="codeHeadlineBox">
<p>Usage of ApplicationUpdaterUI ( <a href="http://www.websector.de/blog/wp-content/uploads/2009/09/09/snippet0.txt">Download code</a> )</p>
</div>
<div class="actionscript" style="font-family: monospace;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// [1] Using ApplicationUpdaterUI as a popup window using ActionScript</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> updater: ApplicationUpdaterUI = <span class="kw2">new</span> ApplicationUpdaterUI<span class="br0">&#40;</span>&nbsp; &nbsp;<span class="kw2">new</span> File <span class="br0">&#40;</span> <span class="st0">&#8216;pathToYourUpdaterXML&#8217;</span> <span class="br0">&#41;</span>, <span class="kw2">true</span>, <span class="kw2">true</span> <span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Optional: setting skin</span></div>
</li>
<li class="li1">
<div class="de1">updater.<span class="kw3">setStyle</span><span class="br0">&#40;</span><span class="st0">&#8216;skinClass&#8217;</span>, de.<span class="me1">websector</span>.<span class="me1">utils</span>.<span class="me1">updater</span>.<span class="me1">ui</span>.<span class="me1">skins</span>.<span class="me1">silver</span>.<span class="me1">AppUpdaterUISilverSkin</span><span class="br0">&#41;</span>; &nbsp; </div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Optional:&nbsp; change the height and width of the window</span></div>
</li>
<li class="li1">
<div class="de1">updater.<span class="me1">windowHeight</span> = <span class="nu0">300</span>;&nbsp;&nbsp;&nbsp;&nbsp;</div>
</li>
<li class="li1">
<div class="de1">updater.<span class="me1">windowWidth</span> = <span class="nu0">500</span>;&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// check for updates</span></div>
</li>
<li class="li1">
<div class="de1">updater.<span class="me1">checkNow</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// [2] Using ApplicationUpdaterUI as an embedded view within your application</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Important: Avoid using popup window: useWindow=false (default is true)</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Optional: setting skin class via &quot;skinClass&quot;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Optional: If the view should be visible only if an update available set invisibleCheck=&quot;true&quot; (default is false)</span></div>
</li>
<li class="li1">
<div class="de1">&lt;ws:ApplicationUpdaterUI</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; xmlns:ws=<span class="st0">&quot;http://websector.de&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; id=<span class="st0">&quot;updater&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw3">width</span>=<span class="st0">&quot;100%&quot;</span> <span class="kw3">height</span>=<span class="st0">&quot;50&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; configurationFile=<span class="st0">&quot;{ new File ( Constants.UPDATE_FILE ) }&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; skinClass=<span class="st0">&quot;de.websector.utils.updater.ui.skins.firefox.AppUpdaterUIFirefoxSkin&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; invisibleCheck=<span class="st0">&quot;true&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; useWindow=<span class="st0">&quot;false&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; /&gt;</div>
</li>
</ol>
</div>
</phpcode>
<h2>Skin examples</h2>
<p>It&#8217;s pretty easy to create your own skin and add it to the component! Check out the 3 different skins and feel free to use these as an example for your custom skins. </p>
<ol>
<li><em>AppUpdaterUIStandardSkin:</em> Cloned interface of the Flex 3 based ApplicationUpdaterUI</li>
<li><em>AppUpdaterUISilverSkin:</em> Inspired from Adobes shiny XD components</li>
<li><em>AppUpdaterUIFirefoxSkin:</em> That&#8217;s my favorite <img src='http://www.websector.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . Do you know the status bar on the top of a HTML page in Firefox 3.0 if a popup is trying to open? This skin a clone of such a bar to inform the user, if an update available. No need for an extra popup window.</li>
</ol>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_FlexUpdaterUIExample_827814364"
			class="flashmovie"
			width="500"
			height="500">
	<param name="movie" value="http://www.websector.de/blog/wp-content/uploads/2009/09/09/FlexUpdaterUIExample.swf" />
	<param name="menu" value="false" />
	<param name="bgcolor" value="#FFFFFF" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.websector.de/blog/wp-content/uploads/2009/09/09/FlexUpdaterUIExample.swf"
			name="fm_FlexUpdaterUIExample_827814364"
			width="500"
			height="500">
		<param name="menu" value="false" />
		<param name="bgcolor" value="#FFFFFF" />
	<!--<![endif]-->
		
<h2>Download full source</h2>
<p>Full source is available at GitHub (package: <em>de.websector.utils.updater.ui.*</em>) :<br />
<a href="http://github.com/sectore/applicationupdaterui/">http://github.com/sectore/applicationupdaterui/</a></p>
<p>All source of ApplicationUpdaterUI  is open source licensed under <a href="http://www.mozilla.org/MPL/MPL-1.1.html">Mozilla Public License 1.1.</a></p>
<h2>Personal TODOs</h2>
<ul>
<li>Documenting / commenting code base</li>
<li>It&#8217;s not a &#8220;most wanted feature&#8221; right now, but handling of an update using files (events: StatusFileUpdateEvent.FILE_UPDATE_STATUS and StatusFileUpdateErrorEvent.FILE_UPDATE_ERROR) would be nice. If I have the time, I&#8217;m going to implement it. </li>
</ul>
<p>Happy updating <img src='http://www.websector.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  !</p>
<p>-Jens</p>
]]></content:encoded>
			<wfw:commentRss>http://www.websector.de/blog/2009/09/09/custom-applicationupdaterui-for-using-air-updater-framework-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>ThunderBolt AS3 version 2.2 out now!</title>
		<link>http://www.websector.de/blog/2009/03/08/thunderbolt-as3-version-22-out-now/</link>
		<comments>http://www.websector.de/blog/2009/03/08/thunderbolt-as3-version-22-out-now/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 16:33:31 +0000</pubDate>
		<dc:creator>sectore</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[ThunderBolt]]></category>

		<guid isPermaLink="false">http://www.websector.de/blog/?p=262</guid>
		<description><![CDATA[ThunderBolt AS3, which is a lightweight logger extension for Flex 3-4, AIR and Flash 9-10 applications, has been updated to version 2.2. Check out the new features: New features Logging of package names + class names + code line numbers (Flash Debug Player required). ThunderBoltTarget for using Flex Logging API improved. SWC updated for using [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/flash-thunderbolt/" class="img"><img src="http://www.websector.de/blog/wp-content/uploads/2009/03/08/ThunderBoltAS3_teaser.png" width="500" height="90" /></a></p>
<p><a href="http://code.google.com/p/flash-thunderbolt/">ThunderBolt AS3</a>, which is a lightweight logger extension for Flex 3-4, AIR and Flash 9-10 applications, has been updated to version 2.2. </p>
<p>Check out the <a href="http://www.websector.de/blog/2009/03/08/thunderbolt-as3-version-22-out-now">new features</a>:</p>
<p><span id="more-262"></span></p>
<h2>New features</h2>
<ol>
<li>Logging of package names + class names + code line numbers (Flash Debug Player required).
<p><img src="http://www.websector.de/blog/wp-content/uploads/2009/03/08/thunderbolt_codelinenumbers.png" width="494" height="296" /></p>
</li>
<li><a href="http://code.google.com/p/flash-thunderbolt/source/browse/trunk/as3/source/org/osflash/thunderbolt/ThunderBoltTarget.as">ThunderBoltTarget</a> for using <a href="http://livedocs.adobe.com/flex/3/html/logging_09.html">Flex Logging API</a> improved.</li>
<li><a href="http://code.google.com/p/flash-thunderbolt/source/browse/#svn/trunk/as3/libs">SWC</a> updated for using Flex 4 (<a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo">Gumbo</a>)</li>
<li><a href="http://code.google.com/p/flash-thunderbolt/wiki/ThunderBoltAS3Console">ThunderBolt AS3 Console</a> uses a certificate of <a href="http://www.thawte.com/">Thawte</a> sponsored by <a href="http://www.adobe.com/">Adobe</a>.
<p><img src="http://www.websector.de/blog/wp-content/uploads/2009/03/08/thunderbolt_certificate.png" width="500" height="410" /></p>
</li>
<li><a href="http://code.google.com/p/flash-thunderbolt/wiki/ThunderBoltAS3Console">ThunderBolt AS3 Console</a> is updated using latest version of <a href="http://get.adobe.com/air/">Adobe AIR v.1.5.1</a></li>
<li><a href="http://code.google.com/p/flash-thunderbolt/issues/detail?id=10">Issue 10</a> fixed: &#8220;<a href="http://code.google.com/p/flash-thunderbolt/issues/detail?id=10">Command + Q not working in OS X</a>&#8220;</li>
<li>All <a href="http://code.google.com/p/flash-thunderbolt/downloads/list">examples</a> and <a href="http://code.google.com/p/flash-thunderbolt/w/list">documentation</a> has been updated as well.</li>
</ol>
<p>Happy Logging <img src='http://www.websector.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>-Jens</p>
]]></content:encoded>
			<wfw:commentRss>http://www.websector.de/blog/2009/03/08/thunderbolt-as3-version-22-out-now/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Quick tip (AIR): Updating an existing AIR app for using a new certificate</title>
		<link>http://www.websector.de/blog/2009/03/06/quick-tip-air-update-an-existing-air-app-for-using-a-new-certificate/</link>
		<comments>http://www.websector.de/blog/2009/03/06/quick-tip-air-update-an-existing-air-app-for-using-a-new-certificate/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 18:51:40 +0000</pubDate>
		<dc:creator>sectore</dc:creator>
				<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://www.websector.de/blog/?p=227</guid>
		<description><![CDATA[First of all thanks Adobe for sponsoring a Thawte certificate after adding ThunderBolt AS3 Console to the new Adobe Marketplace! If you will ever certificate an existing AIR app with a new certificate, such as a Thawte certificate, you have to migrate it. What does &#8220;migrate&#8221; mean? It&#8217;s like an injection for an AIR app [...]]]></description>
			<content:encoded><![CDATA[<p>First of all thanks Adobe for sponsoring a <a href="http://www.thawte.com">Thawte</a> certificate after adding <a href="http://code.google.com/p/flash-thunderbolt/wiki/ThunderBoltAS3Console">ThunderBolt AS3 Console</a> to the <a href="http://www.adobe.com/cfusion/marketplace/index.cfm?event=marketplace.offering&#038;offeringid=10762">new Adobe Marketplace</a>!</p>
<p>If you will ever certificate an existing AIR app with a new certificate, such as a <a href="http://www.thawte.com">Thawte</a> certificate, you have to migrate it. </p>
<p><span id="more-227"></span></p>
<p>What does &#8220;migrate&#8221; mean? It&#8217;s like an injection for an AIR app with all needed information about old and new certificate. You have to do it to avoid any troubles updating an existing AIR app by users. Just follow the next steps:</p>
<ol>
<li>Build your AIR app as always using Flex Builder and signing it up with the new certificate ( Project -> Export Release Build )</li>
<li>Open Terminal and go to project folder typing <code>cd {pathToYourProject}</code></li>
<li>Migrate your new AIR app with the old certificate using <code>-migrate</code> command. <strong>Note:</strong> To run this command make sure that you have added the bin folder of Flex SDK as a PATH environment variable before.
<p>Run:</p>
<p><code>adt -migrate -storetype {fileTypeOfOldCertificate} -keystore {pathToOldCertificate} {appJustCreated}.air {newMigratedApp}.air</code></p>
<li>Type password of the old certificate and that&#8217;s it!</li>
<li>For updating ThunderBoltAS3 Console I did it as follow:</li>
<p><code>adt -migrate -storetype pkcs12 -keystore air_websector_certificate.p12 ThunderBoltAS3Console.air ThunderBoltAS3Console_v2.2.air</code></p>
<p>Some notes:<br />
- <em>pkcs12</em> &#8211; store type of the old certificate (such as JKS, PKCS12, PKCS11, KeychainStore, Windows-MY or Windows-ROOT)<br />
- <em>air_websector_certificate.p12</em> &#8211; path to the old certificate<br />
- <em>ThunderBoltAS3Console.air</em> &#8211; app which has been built before with a new certificate<br />
- <em>ThunderBoltAS3Console_v2.2.air</em> &#8211; app which has to migrate</p>
<li>For more information check &#8220;<a href="http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS5b3ccc516d4fbf351e63e3d118666ade46-7ff0.html#WSFAB6E5EB-316A-42b0-81A3-0BC232ACD99A">Changing certificates</a>&#8221; and &#8220;<a href="http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS13ACB483-1711-43c0-9049-0A7251630A7D.html">Signing an AIR file to change the application certificate</a>&#8221; at <a href="http://help.adobe.com/en_US/AIR/1.5/">LiveDocs for Adobe AIR</a>.</li>
</ol>
<p>-Jens</p>
]]></content:encoded>
			<wfw:commentRss>http://www.websector.de/blog/2009/03/06/quick-tip-air-update-an-existing-air-app-for-using-a-new-certificate/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Swiz example based on Adobe AIR and SQLite</title>
		<link>http://www.websector.de/blog/2009/01/07/swiz-example-based-on-adobe-air-and-sqlite/</link>
		<comments>http://www.websector.de/blog/2009/01/07/swiz-example-based-on-adobe-air-and-sqlite/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 12:58:53 +0000</pubDate>
		<dc:creator>sectore</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.websector.de/blog/?p=114</guid>
		<description><![CDATA[About two months ago Sönke Rohde, a good friend of me and a very active contributor of the Swiz framework, told me about his experiences using Swiz and he recommended highly Swiz as a framework which seems brutally simple to use. For all the people out there who are not familiar with Swiz: Swiz is [...]]]></description>
			<content:encoded><![CDATA[<p>About two months ago <a href="http://soenkerohde.com/">Sönke Rohde</a>, a good friend of me and a very active contributor of the <a href="http://code.google.com/p/swizframework/">Swiz framework</a>, told me about his experiences using Swiz and <a href="http://soenkerohde.com/2008/09/swiz-framework-brutally-simple/">he recommended highly</a> Swiz as a framework which seems brutally simple to use. For all the people out there who are not familiar with Swiz: Swiz is an <a href="http://en.wikipedia.org/wiki/Inversion_of_Control">IoC</a> framework created by <a href="http://cdscott.blogspot.com/">Chris Scott</a> to simplify the development of <a href="http://www.adobe.com/products/flex/">Flex</a> based RIAs.</p>
<p><span id="more-114"></span></p>
<p>After <a href="http://www.websector.de/blog/2009/01/02/wspluginswitcher-cocoa-based-tool-for-switching-flash-plug-in-on-os-x/">diving into Objective-C for the last two weeks</a> I have now the time to dive into Swiz. So I ported my <a href="http://www.websector.de/blog/2008/10/04/new-mate-extensions-for-using-air-and-sqlite-sqlservice-sqlserviceinvoker/">latest published example using Mate</a> into Swiz.</p>
<p>The following example is a tiny AIR based application for storing user names into a SQLite database. It includes Eric Feminellas awesome <a href="http://www.ericfeminella.com/blog/2008/09/29/air-sql-framework/">AIR SQL Framework</a> and a way to use the <a href="http://weblogs.macromedia.com/paulw/archives/2007/10/presentation_pa_3.html">Presentation Model pattern</a> within an AIR application as well.</p>
<h2>Screen shot</h2>
<p><a class="img" href="http://www.websector.de/blog/download-manager.php?id=21"><img src="http://www.websector.de/blog/wp-content/uploads/2009/01/07/screen_app.png" alt="Click to download source code" /></a></p>
<h2>View source code</h2>
<p>Check out the source code: <a href="http://www.websector.de/blog/wp-content/uploads/2009/01/07/index.html">View source code</a></p>
<h2>Download full source</h2>
<p>Full source of the example: <a href="http://www.websector.de/blog/?download=SwizAIRSQLiteExample.zip">SwizAIRSQLiteExample.zip</a> (Downloads: 1358)</p>
<h2>Acknowledge</h2>
<ul>
<li>Video &#8211; 360|Flex, San Jose 2008 &#8211; Chris Scott: <a href="http://www.onflex.org/ted/2008/09/360flex-sj-2008-introduction-to-swiz.php">Introduction to the Swiz Framework for Flex</a></li>
<li>Sönke Rohde: <a href="http://soenkerohde.com/2008/11/mock-business-delegates-with-swiz/">Mock Business Delegates with Swiz</a></li>
<li>Tony Hillerson: <a href="http://www.insideria.com/2008/12/frameworkquest-2008-part-4-ioc.html">FrameworkQuest 2008 Part 4: IoC With Swiz</a></li>
<li><a href="http://code.google.com/p/swizframework/w/list">Swiz wiki pages at Google Code</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.websector.de/blog/2009/01/07/swiz-example-based-on-adobe-air-and-sqlite/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>New Mate extensions for using AIR and SQLite: &#8220;SQLService + SQLServiceInvoker&#8221;</title>
		<link>http://www.websector.de/blog/2008/10/04/new-mate-extensions-for-using-air-and-sqlite-sqlservice-sqlserviceinvoker/</link>
		<comments>http://www.websector.de/blog/2008/10/04/new-mate-extensions-for-using-air-and-sqlite-sqlservice-sqlserviceinvoker/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 20:33:52 +0000</pubDate>
		<dc:creator>sectore</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.websector.de/blog/?p=60</guid>
		<description><![CDATA[UPDATE [10/26/08]: Source of the extensions and the example as well has been moved to the project called &#8216;mate-examples&#8217; on Google Code If you are using Mate for application development based on Adobe AIR you may need an extension for using SQLite, because its in Mate currently not built in. It seems that only one [...]]]></description>
			<content:encoded><![CDATA[<p style="background-color: #F6F6F6;">
<strong>UPDATE [10/26/08]: </strong>Source of the extensions and the example as well has been moved to the project called <a href="http://code.google.com/p/mate-examples/">&#8216;mate-examples&#8217; on Google Code</a></p>
<p>If you are using <a href="http://mate.asfusion.com/">Mate</a> for application development based on <a href="http://www.adobe.com/products/air/">Adobe AIR</a> you may need an extension for using <a href="http://sqlite.org/">SQLite</a>, because its in Mate currently not built in. It seems that only <a href="http://www.freewebtown.com/mloncaric/mate/SQLServiceInvoker.as">one extension</a> by <a href="http://miran.nonlogic.org/">Miran Loncaric</a> available, which depends on <a href="http://www.ericfeminella.com/blog/">Eric Feminellas</a> <a href="http://www.ericfeminella.com/blog/actionscript-3-apis">SQLService</a>. Unfortunately this Mate extension lacks for using result or fault handlers, using prepared SQLStatements, parameters etc.</p>
<p><span id="more-60"></span></p>
<p>Therefore I&#8217;ve started to develop new extensions called <code>SQLService</code> and <code>SQLServiceInvoker</code> with all the needed stuff such as result and fault handling within an EventMap, (re-)using prepared statements, &#8220;simple&#8221; SQL texts, named parameters etc.</p>
<p>BTW: <a href="http://blog.iconara.net">Theo Hultberg</a> has already opened a <a href="http://code.google.com/p/mate-examples/">very cool project on Google Code</a> for free examples based on Mate, so I hope that the new extensions will be added as well.</p>
<h2>Screen shot of the AIR example</h2>
<p><img src="http://www.websector.de/blog/wp-content/uploads/2008/10/04/mateAIRSQLiteExample.png" alt="" width="500" height="450" /></p>
<h2>Code example for using the extensions</h2>
<p>Here is the most important part – the MainEventMap which is an <a href="http://mate.asfusion.com/page/documentation/tags/eventmap">EventMap</a> for handling all SQLite services.</p>
<phpcode>
<div class="codeHeadlineBox">
<p>MainEventMap.mxml ( <a href="http://www.websector.de/blog/wp-content/uploads/2008/10/04/MainEventMap.mxml">Download code</a> )</p>
</div>
<div class="actionscript" style="font-family: monospace;">
<ol>
<li class="li1">
<div class="de1">&lt;?<span class="kw3">xml</span> <span class="kw3">version</span>=<span class="st0">&quot;1.0&quot;</span> encoding=<span class="st0">&quot;utf-8&quot;</span>?&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;!&#8211;</div>
</li>
<li class="li1">
<div class="de1">* </div>
</li>
<li class="li1">
<div class="de1">* Mate extensions called <span class="st0">&quot;SQLService&quot;</span> <span class="kw3">and</span> <span class="st0">&quot;SQLServiceInvoker&quot;</span> <span class="kw1">for</span> using AIR <span class="kw3">and</span> SQLite</div>
</li>
<li class="li1">
<div class="de1">* </div>
</li>
<li class="li1">
<div class="de1">* @author&nbsp; &nbsp;Jens Krause <span class="br0">&#91;</span> www.<span class="me1">websector</span>.<span class="me1">de</span>/blog <span class="br0">&#93;</span></div>
</li>
<li class="li1">
<div class="de1">* </div>
</li>
<li class="li1">
<div class="de1">&#8211;&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;EventMap </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; xmlns:mx=<span class="st0">&quot;http://www.adobe.com/2006/mxml&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; xmlns=<span class="st0">&quot;http://mate.asfusion.com/&quot;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; xmlns:air=<span class="st0">&quot;de.websector.mate.extensions.air.*&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; xmlns:manager=<span class="st0">&quot;example.models.manager.*&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; xmlns:<span class="kw3">data</span>=<span class="st0">&quot;flash.data.*&quot;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;mx:Script&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;!<span class="br0">&#91;</span>CDATA<span class="br0">&#91;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> example.<span class="me1">models</span>.<span class="me1">presentation</span>.<span class="me1">MainViewModel</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> example.<span class="me1">views</span>.<span class="me1">MainView</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> example.<span class="me1">models</span>.<span class="kw3">domain</span>.<span class="me1">MainModel</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> example.<span class="me1">views</span>.<span class="me1">GenericFaultHandler</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> example.<span class="me1">events</span>.<span class="me1">UserEvent</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> example.<span class="me1">models</span>.<span class="me1">vo</span>.<span class="me1">UserVO</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> com.<span class="me1">asfusion</span>.<span class="me1">mate</span>.<span class="me1">events</span>.<span class="me1">UnhandledFaultEvent</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">import</span> mx.<span class="me1">events</span>.<span class="me1">FlexEvent</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#93;</span><span class="br0">&#93;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/mx:Script&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;Debugger </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">level</span>=<span class="st0">&quot;{ Debugger.ALL }&quot;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; /&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;air:SQLService id=<span class="st0">&quot;sqlService&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;databasePath=<span class="st0">&quot;{ SQLManager.DB_PATH }&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; /&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;manager:SQLManager id=<span class="st0">&quot;sqlManager&quot;</span> /&gt;&nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;!&#8211;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; Flex Events</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &#8211;&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;EventHandlers <span class="kw3">type</span>=<span class="st0">&quot;{FlexEvent.PREINITIALIZE}&quot;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;ObjectBuilder generator=<span class="st0">&quot;{ MainModel }&quot;</span> /&gt;&nbsp;&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/EventHandlers&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;!&#8211;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; Create a table using SQLServiceInvokers attribute called sql to <span class="kw3">set</span> a SQL <span class="kw3">text</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &#8211;&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;EventHandlers <span class="kw3">type</span>=<span class="st0">&quot;{FlexEvent.APPLICATION_COMPLETE}&quot;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;air:SQLServiceInvoker</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; instance=<span class="st0">&quot;{ sqlService }&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql=<span class="st0">&quot;CREATE TABLE IF NOT EXISTS users (userId INTEGER PRIMARY KEY AUTOINCREMENT, firstName TEXT, lastName TEXT)&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &lt;air:resultHandlers&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&lt;EventAnnouncer </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; generator=<span class="st0">&quot;{ UserEvent}&quot;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">type</span>=<span class="st0">&quot;{ UserEvent.GET_ALL }&quot;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &lt;/air:resultHandlers&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/air:SQLServiceInvoker&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/EventHandlers&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;!&#8211;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">Get</span> all stored user from database using a prepared SQLStatement, which is created by SQLManager.</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &#8211;&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;EventHandlers <span class="kw3">type</span>=<span class="st0">&quot;{ UserEvent.GET_ALL }&quot;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;air:SQLServiceInvoker</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; instance=<span class="st0">&quot;{ sqlService }&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; statement=<span class="st0">&quot;{ sqlManager.getAllUsers }&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;air:resultHandlers&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;MethodInvoker </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; generator=<span class="st0">&quot;{ MainModel }&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; method=<span class="st0">&quot;setUserData&quot;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">arguments</span>=<span class="st0">&quot;{ resultObject }&quot;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /&gt;&nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &lt;/air:resultHandlers&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/air:SQLServiceInvoker&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/EventHandlers&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;!&#8211;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">Delete</span> selected user from database using a prepared SQLStatement, which is created by SQLManager.</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &#8211;&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;EventHandlers <span class="kw3">type</span>=<span class="st0">&quot;{ UserEvent.DELETE }&quot;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;air:SQLServiceInvoker</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; instance=<span class="st0">&quot;{ sqlService }&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; statement=<span class="st0">&quot;{ sqlManager.deleteUser }&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; parameters=<span class="st0">&quot;{[ event.userId ]}&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;air:resultHandlers&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;EventAnnouncer </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; generator=<span class="st0">&quot;{ UserEvent}&quot;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">type</span>=<span class="st0">&quot;{ UserEvent.GET_ALL}&quot;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &lt;/air:resultHandlers&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/air:SQLServiceInvoker&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/EventHandlers&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;!&#8211;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">Add</span> <span class="kw2">new</span> user to database using a prepared SQLStatement, which is created by SQLManager.</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &#8211;&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;EventHandlers <span class="kw3">type</span>=<span class="st0">&quot;{ UserEvent.ADD }&quot;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;air:SQLServiceInvoker</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; instance=<span class="st0">&quot;{ sqlService }&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; statement=<span class="st0">&quot;{ sqlManager.addUser }&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; parameters=<span class="st0">&quot;{[ event.userVO.firstName, event.userVO.lastName ]}&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;air:resultHandlers&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;EventAnnouncer </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; generator=<span class="st0">&quot;{ UserEvent}&quot;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">type</span>=<span class="st0">&quot;{ UserEvent.GET_ALL }&quot;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &lt;/air:resultHandlers&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/air:SQLServiceInvoker&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/EventHandlers&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;!&#8211;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; Update selected user from database using a prepared SQLStatement, which is created by SQLManager.</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &#8211;&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;EventHandlers <span class="kw3">type</span>=<span class="st0">&quot;{ UserEvent.UPDATE }&quot;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;air:SQLServiceInvoker</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; instance=<span class="st0">&quot;{ sqlService }&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; statement=<span class="st0">&quot;{ sqlManager.updateUser }&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; parameters=<span class="st0">&quot;{[ event.userVO.firstName, event.userVO.lastName, event.userVO.userId ]}&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;air:resultHandlers&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;EventAnnouncer </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; generator=<span class="st0">&quot;{ UserEvent}&quot;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">type</span>=<span class="st0">&quot;{ UserEvent.GET_ALL }&quot;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &lt;/air:resultHandlers&gt;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/air:SQLServiceInvoker&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/EventHandlers&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;!&#8211;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; Handling <span class="kw1">for</span> fault event may dispatched by SQLServiceInvoker or other services</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &#8211;&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;EventHandlers <span class="kw3">type</span>=<span class="st0">&quot;{ UnhandledFaultEvent.FAULT }&quot;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;MethodInvoker generator=<span class="st0">&quot;{ GenericFaultHandler }&quot;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; method=<span class="st0">&quot;handleFault&quot;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">arguments</span>=<span class="st0">&quot;{event.fault}&quot;</span> /&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/EventHandlers&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&lt;/EventMap&gt;</div>
</li>
</ol>
</div>
</phpcode>
<p>I&#8217;m a big fan of using <a href="http://martinfowler.com/eaaDev/PresentationModel.html">presentation models</a>, so you will have a further example for using it as well <img src='http://www.websector.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  . For using presentation models within Mate check out the <a href="http://blog.iconara.net/2008/09/30/creating-a-document-based-application-with-mate/">great example called &#8216;document based&#8217;</a> by Theo Hultberg  and his <a href="http://code.google.com/p/mate-examples/wiki/PresentationModel">very detailed post</a> on Google Code.</p>
<h2>To-dos</h2>
<ul>
<li>Using transactions for batch INSERT/UPDATE/DELETE operations based on the <a href="http://probertson.com/articles/2008/08/22/360flex-slides-for-air-sqlite-optimization-conversation/">great tips using AIR and SQLite</a> by <a href="http://probertson.com/">Paul Robertson</a>!</li>
</ul>
<h2>Download full source</h2>
<p><strike>Full source of the AIR example above including the new extensions called <code>SQLService</code> and <code>SQLServiceInvoker</code> <a href="">MateAIRSQLiteExample.zip</a></strike></p>
<p>[UPDATE] Full source of the extensions and the example as well has been moved to the project called <a href="http://code.google.com/p/mate-examples/">&#8216;mate-examples&#8217; on Google Code</a>[/UPDATE] </p>
<h2>Acknowledge</h2>
<ul>
<li>Eric Feminella: <a href="http://www.ericfeminella.com/blog/2008/09/29/air-sql-framework/">AIR SQL Framework</a></li>
<li>Peter Elst: <a href="http://www.peterelst.com/blog/2008/04/07/introduction-to-sqlite-in-adobe-air/">SQLite wrapper classes</a></li>
<li>AIR doku on Adobe: &#8220;<a href="http://help.adobe.com/en_US/AIR/1.1/devappshtml/WS5b3ccc516d4fbf351e63e3d118676a5497-7fb4.html">Working with local SQL databases</a>&#8220;</li>
<li>H. Paul Robertson: &#8220;<a href="http://probertson.com/articles/2008/08/22/360flex-slides-for-air-sqlite-optimization-conversation/">360|Flex slides for &#8216;AIR SQLite: An optimization conversation</a>&#8220;</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.websector.de/blog/2008/10/04/new-mate-extensions-for-using-air-and-sqlite-sqlservice-sqlserviceinvoker/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>How to setup Flex Builder 3 Eclipse plugin for using Adobe AIR 1.1</title>
		<link>http://www.websector.de/blog/2008/06/17/how-to-setup-flex-builder-3-eclipse-plugin-for-using-adobe-air-11/</link>
		<comments>http://www.websector.de/blog/2008/06/17/how-to-setup-flex-builder-3-eclipse-plugin-for-using-adobe-air-11/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 04:03:00 +0000</pubDate>
		<dc:creator>sectore</dc:creator>
				<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://www.websector.de/blog/2008/06/17/how-to-setup-flex-builder-3-eclipse-plugin-for-using-adobe-air-11/</guid>
		<description><![CDATA[Adobe AIR 1.1 is out of the door right now. But it seems that there is no integrated update mechanism for Flex Builder 3 Eclipse Plug-In using the new version of Adobe AIR. Anyway, its pretty easy to setup it manually. Here a step by step tutorial on OS X: Install the latest Adobe AIR [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.adobe.com/products/air/">Adobe AIR 1.1</a> is out of the door right now. But it seems that there is no integrated update mechanism for Flex Builder 3 Eclipse Plug-In using the new version of Adobe AIR. Anyway, its pretty easy to setup it manually. </p>
<p>Here a step by step tutorial on OS X:</p>
<p><span id="more-52"></span></p>
<ol>
<li>
<p>Install the <a href="http://get.adobe.com/air/">latest Adobe AIR runtime</a> and download the latest <a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3">Flex 3 SDK version 3.0.2</a>.</p>
</li>
<li>
<p>Create a new subfolder for the new SDK within your Flex Builder Plugin installation called &#8220;3.0.2&#8243;</p>
<p><img src="http://www.websector.de/blog/wp-content/uploads/2008/06/17/finder.png" width="498" height="370"  /></p>
</li>
<li>
<p>Unzip the downloaded SDK and copy all its content to the subfolder mentioned above.</p>
</li>
<li>
<p>Open Eclipse and add the new SDK to the list of all installed Flex SDKs: <br />Preferences -> Flex -> Installed Flex SDK -> Add </p>
<p><img src="http://www.websector.de/blog/wp-content/uploads/2008/06/17/add.png" width="500" height="401" /></p>
<p><img src="http://www.websector.de/blog/wp-content/uploads/2008/06/17/default.png" width="498" height="237" /></p>
</li>
<li>
<p>Create a new AIR project as usual: File -> New -> Flex project</p>
<p><img src="http://www.websector.de/blog/wp-content/uploads/2008/06/17/project.png" width="469" height="512" /></p>
</li>
<li>
<p>The following step is very important: Modify within the application descriptor file called <code>[yourAppName]-app.xml</code> the root node named <code>application</code> the version <code>1.0</code> to <code>1.1</code></p>
<p><img src="http://www.websector.de/blog/wp-content/uploads/2008/06/17/description.png" width="497" height="341" /></p>
</li>
<li>
<p>Don&#8217;t forget to set the the new SDK for the Flex Compiler settings as well: Project -> Properties -> Flex Compiler -> Flex SDK version -> Flex 3.0.2</p>
<p><img src="http://www.websector.de/blog/wp-content/uploads/2008/06/17/compiler.png" width="500" height="452" /></p>
</li>
<li>
<p>Run the application: Run -> Run as -> Adobe AIR application</p>
<p><img src="http://www.websector.de/blog/wp-content/uploads/2008/06/17/window.png" width="381" height="193" /></p>
</li>
</ol>
<p>That&#8217;s all <img src='http://www.websector.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><strong>P.S.:</strong> For all the Flex Builder Pro user out there, who uses automated testing etc.: As Matt Chotin mentioned you have to copy a few needed SWC&#8217;s form the 3.0 SDK to the new 3.0.2 SDK folder as well. For more information check his article at ADC: <a href="http://www.adobe.com/devnet/flex/articles/flex_air1.1.html">&#8220;Developing Flex applications for AIR 1.1&#8243;</a></p>
<h2>Acknowledge</h2>
<ul>
<li>Matt Chotin: <a href="http://www.adobe.com/devnet/flex/articles/flex_air1.1.html">&#8220;Developing Flex applications for AIR 1.1&#8243;</a></li>
<li>Flex 3 Builder documentation: <a href="http://livedocs.adobe.com/flex/3/html/build_6.html">&#8220;Advanced build options&#8221;</a></li>
<li>Adobe: <a href="http://www.adobe.com/go/air1-1faq">AIR 1.1 FAQ</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.websector.de/blog/2008/06/17/how-to-setup-flex-builder-3-eclipse-plugin-for-using-adobe-air-11/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>10 tips and tricks using ThunderBolt AS3</title>
		<link>http://www.websector.de/blog/2008/06/15/10-tips-and-tricks-using-thunderbolt-as3/</link>
		<comments>http://www.websector.de/blog/2008/06/15/10-tips-and-tricks-using-thunderbolt-as3/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 10:02:00 +0000</pubDate>
		<dc:creator>sectore</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[ThunderBolt]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Almost one year ago I started to develop a small extension called ThunderBolt AS3 for logging ActionScript 3 applications using Firebug as simple as possible. Today its nice to see that the community uses and supports this extension as well. For all those who not familiar with it: ThunderBolt AS3 is a lightweight logger extension [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.websector.de/blog/2007/04/21/logging-flex-2-and-as-3-apps-with-firebug-and-thunderbolt/">Almost one year ago</a> I started to develop a small extension called <a href="http://code.google.com/p/flash-thunderbolt/wiki/ThunderBoltAS3">ThunderBolt AS3</a> for logging ActionScript 3 applications using <a href="http://www.getfirebug.com/">Firebug</a> as simple as possible. Today its nice to see that the community <a href="http://www.flashcomguru.com/index.cfm/2008/6/6/thunderbolt-air">uses</a> <a href="http://www.flex888.com/2008/06/14/debugging-flex-with-thunderbolt.html">and</a> <a href="http://blog.digitalbackcountry.com/?p=1452">supports</a> this extension as well.</p>
<p>For all those who not familiar with it: <a href="http://code.google.com/p/flash-thunderbolt/wiki/ThunderBoltAS3">ThunderBolt AS3</a> is a lightweight logger extension for any ActionScript 3 applications based on <a href="http://www.adobe.com/products/flash/">Flash CS3</a>, <a href="http://www.adobe.com/products/flex/">Flex</a> or <a href="http://www.adobe.com/products/air/">Adobe AIR</a> using <a href="http://www.getfirebug.com/">Firebug</a> or its own <a href="http://www.websector.de/blog/2008/06/01/the-new-thunderbolt-as3-console-is-based-on-adobe-air/">ThunderBolt AS3 Console</a>.</p>
<p>Here are some tips and tricks using ThunderBolt AS3:</p>
<p><span id="more-51"></span></p>
<ol>
<li>
<h2>Using different log levels</h2>
<p>ThunderBolt AS3 supports different log levels, which based on the supported levels by Firebug, such as &#8220;info&#8221;, &#8220;warn&#8221;, &#8220;error&#8221; or &#8220;debug&#8221;. It&#8217;s pretty simple to use it:</p>
<phpcode>
<div class="codeHeadlineBox">
<p>log level example ( <a href="http://www.websector.de/blog/wp-content/uploads/2008/06/15/loglevels.as">Download code</a> )</p>
</div>
<div class="actionscript" style="font-family: monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">import</span> org.<span class="me1">osflash</span>.<span class="me1">thunderbolt</span>.<span class="me1">Logger</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// some log objects</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> myNumber: <span class="kw3">int</span> = <span class="nu0">5</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> myString: <span class="kw3">String</span> = <span class="st0">&quot;Lorem ipsum&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// INFO log level</span></div>
</li>
<li class="li1">
<div class="de1">Logger.<span class="me1">info</span> <span class="br0">&#40;</span><span class="st0">&quot;Just an info message&quot;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// DEBUG log level</span></div>
</li>
<li class="li1">
<div class="de1">Logger.<span class="me1">debug</span> <span class="br0">&#40;</span><span class="st0">&quot;A debug log &quot;</span>, myString<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// WARN log level</span></div>
</li>
<li class="li1">
<div class="de1">Logger.<span class="me1">warn</span> <span class="br0">&#40;</span><span class="st0">&quot;A warn message&quot;</span>, myNumber<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// ERROR log level</span></div>
</li>
<li class="li1">
<div class="de1">Logger.<span class="kw3">error</span> <span class="br0">&#40;</span><span class="st0">&quot;An error log &quot;</span>, myString<span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</phpcode>
<p><strong>Screen shot using Firebug:</strong><br />
			<img src="http://www.websector.de/blog/wp-content/uploads/2008/06/15/loglevels.png" width="498" height="224" />
			</p>
<p><strong>Screen shot using ThunderBolt AS3 Console:</strong><br />
				<img src="http://www.websector.de/blog/wp-content/uploads/2008/06/15/loglevels2.png" width="498" height="356" />
				</p>
</li>
<li>
<h2>Logging one or more objects at once</h2>
<p>ThunderBolt AS3 logs more than one objects at once. It could be primitive types (<code>int</code>, <code>uint</code>, <code>Number</code>, <code>Boolean</code>, &#8230;) or more complex data such as an instance of any classes or nested objects. Here an example:</p>
<phpcode>
<div class="codeHeadlineBox">
<p>Example for logging few objects at once ( <a href="http://www.websector.de/blog/wp-content/uploads/2008/06/15/objects.as">Download code</a> )</p>
</div>
<div class="actionscript" style="font-family: monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">import</span> org.<span class="me1">osflash</span>.<span class="me1">thunderbolt</span>.<span class="me1">Logger</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// some log objects</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> myNumber: <span class="kw3">int</span> = <span class="nu0">5</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> myString: <span class="kw3">String</span> = <span class="st0">&quot;Lorem ipsum&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> myObject: <span class="kw3">Object</span> = <span class="br0">&#123;</span>&nbsp; &nbsp; exampleArray: <span class="br0">&#91;</span><span class="st0">&quot;firstValue&quot;</span>, <span class="st0">&quot;secondValue&quot;</span><span class="br0">&#93;</span>, </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y: <span class="nu0">10</span>, </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exampleString: <span class="st0">&quot;Hello&quot;</span>, </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nestedObject: <span class="br0">&#123;</span>&nbsp;x: <span class="nu0">100</span>, </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y: <span class="nu0">200</span><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Logging an object with nested items</span></div>
</li>
<li class="li1">
<div class="de1">Logger.<span class="me1">info</span> <span class="br0">&#40;</span><span class="st0">&quot;Logging an object with nested items &quot;</span>, myObject<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Logging more objects at once</span></div>
</li>
<li class="li1">
<div class="de1">Logger.<span class="me1">info</span> <span class="br0">&#40;</span><span class="st0">&quot;Logging more objects at once &quot;</span>, myString, myNumber, myObject<span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</phpcode>
<p><strong>Screen shot using Firebug:</strong><br />
				<img src="http://www.websector.de/blog/wp-content/uploads/2008/06/15/objects.png" width="498" height="224" />
				</p>
<p><strong>Screen shot using ThunderBolt AS3 Console:</strong><br />
					<img src="http://www.websector.de/blog/wp-content/uploads/2008/06/15/objects2.png" width="498" height="356" />
					</p>
</li>
<li>
<h2>Using the Flex Logging API</h2>
<p>ThunderBolt AS3 supports the <a href="http://livedocs.adobe.com/flex/3/html/logging_09.html#178687">Flex Logging API</a> using its own log target called <code>ThunderBoltTarget</code>. To use it you will need to use and import the <a href="http://code.google.com/p/flash-thunderbolt/source/browse/trunk/as3/source/org/osflash/thunderbolt/ThunderBoltTarget.as">ThunderBoltTarget.as</a> as well:</p>
<phpcode>
<div class="codeHeadlineBox">
<p>Example for using Flex logging API ( <a href="http://www.websector.de/blog/wp-content/uploads/2008/06/15/flexapi.as">Download code</a> )</p>
</div>
<div class="actionscript" style="font-family: monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">import</span> mx.<span class="me1">logging</span>.<span class="kw3">Log</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">import</span> org.<span class="me1">osflash</span>.<span class="me1">thunderbolt</span>.<span class="me1">ThunderBoltTarget</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// init ThunderBoltTarget</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">_target</span> = <span class="kw2">new</span> ThunderBoltTarget<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">/*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI"> You can disable the time, level or category as well&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI"> _target.includeTime = false;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI"> _target.includeLevel = false;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI"> _target.includeCategory = false;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">*/</span>&nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">_target</span>.<span class="me1">filters</span> = <span class="br0">&#91;</span><span class="st0">&quot;de.websector.playground.ThunderBoltTargetExample&quot;</span><span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">Log</span>.<span class="me1">addTarget</span><span class="br0">&#40;</span><span class="kw3">_target</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// start logging</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">Log</span>.<span class="me1">getLogger</span><span class="br0">&#40;</span><span class="st0">&quot;de.websector.playground.ThunderBoltTargetExample&quot;</span><span class="br0">&#41;</span>.<span class="me1">info</span><span class="br0">&#40;</span><span class="st0">&quot;Just an info message.&quot;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</phpcode>
<p><strong>Screen shot using Firebug:</strong><br />
			<img src="http://www.websector.de/blog/wp-content/uploads/2008/06/15/flexapi.png" width="498" height="150" />
			</p>
<p><strong>Screen shot using ThunderBolt AS3 Console:</strong><br />
				<img src="http://www.websector.de/blog/wp-content/uploads/2008/06/15/flexapi2.png" width="498" height="234" />
				</p>
</li>
<li>
<h2>Stop and hide logging</h2>
<p>To release your project you might to disable all logging data. Then put the following line into your code.</p>
<phpcode>
<div class="actionscript" style="font-family: monospace;">
<ol>
<li class="li1">
<div class="de1">Logger.<span class="kw3">hide</span> = <span class="kw2">true</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
</phpcode></li>
<li>
<h2>Show a memory snapshot</h2>
<p>Make a memory snapshot whenever you want:</p>
<phpcode>
<div class="actionscript" style="font-family: monospace;">
<ol>
<li class="li1">
<div class="de1">Logger.<span class="me1">memorySnapshot</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
</phpcode></li>
<li>
<h2>Show or hide a time stamp</h2>
<p>Lets make a time stamp. The default value is &#8220;true&#8221;. To hide the time stamp use this:</p>
<phpcode>
<div class="actionscript" style="font-family: monospace;">
<ol>
<li class="li1">
<div class="de1">Logger.<span class="me1">includeTime</span> = <span class="kw2">false</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
</phpcode></li>
<li>
<h2>Using the new ThunderBolt AS3 <strike>v.2.1beta</strike> v.2.0 and its Console</h2>
<p><a href="http://code.google.com/p/flash-thunderbolt/downloads/list">The new version of ThunderBolt AS3</a> (<strike>v.2.1beta</strike> v.2.0) detects either Firebug is installed or not. If not, then it uses the well known <code>trace()</code> method to log all data into &#8220;flashlog.txt&#8221;. You can enforce this process using:</p>
<phpcode>
<div class="actionscript" style="font-family: monospace;">
<ol>
<li class="li1">
<div class="de1">Logger.<span class="me1">console</span> = <span class="kw2">true</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
</phpcode>
<p>To show all information in a well defined structure I&#8217;d recommend to use the new <a href="http://code.google.com/p/flash-thunderbolt/wiki/ThunderBoltAS3Console">ThunderBolt AS3 Console</a>. It&#8217;s a handy tool to log any AIR application as well <img src='http://www.websector.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  </p>
</li>
<li>
<h2>Using the ThunderBolt AS3 Console for logging ActionScript 1 or 2 projects</h2>
<p>As described above <a href="http://code.google.com/p/flash-thunderbolt/wiki/ThunderBoltAS3Console">ThunderBolt AS3 Console</a> follows a simple principle: It reads just all information logged by the ThunderBolt AS3 Logger (<strike>v.2.1beta</strike> v.2.0) into &#8220;flashlog.txt&#8221; and shows it in a hierarchal order based on different log levels. </p>
<p>That means you can use ThunderBolt AS3 Console for logging any AS 1 or 2 projects too <img src='http://www.websector.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  . Just call a <code>trace()</code> method as follows. Note the prefixes named &#8220;info&#8221;, &#8220;error&#8221;, &#8220;warn&#8221; or &#8220;debug&#8221; followed by a whitespace at the beginning:</p>
<phpcode>
<div class="codeHeadlineBox">
<p>trace() example for using ThunderBolt AS3 Console ( <a href="http://www.websector.de/blog/wp-content/uploads/2008/06/15/trace.as">Download code</a> )</p>
</div>
<div class="actionscript" style="font-family: monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="co1">//</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// tracing an info log level</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">trace</span> <span class="br0">&#40;</span><span class="st0">&quot;info Here is an info message to display using ThunderBolt AS3 Console&quot;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// tracing an error log level</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> myString: <span class="kw3">String</span> = <span class="st0">&quot;hello console&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">trace</span> <span class="br0">&#40;</span><span class="st0">&quot;error Here is an error message&quot;</span> + myString<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// tracing an debug log level</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">trace</span> <span class="br0">&#40;</span><span class="st0">&quot;debug Here is a debug message&quot;</span> + myString<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// tracing a warn log level</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">trace</span> <span class="br0">&#40;</span><span class="st0">&quot;warn Here is a warn message&quot;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
</phpcode>
<p><strong>Screen shot using ThunderBolt AS3 Console:</strong><br />
				<img src="http://www.websector.de/blog/wp-content/uploads/2008/06/15/trace.png" width="498" height="294" />
				</p>
</li>
<li>
<h2>Any issues with the Flash Player security sandbox using Firebug?</h2>
<p>If you have any security issues with the Flash Player security sandbox using ThunderBolt AS3 and Firebug set within your HTML template the value of the parameter named &#8220;allowScriptAccess&#8221; to &#8220;always&#8221;. For more information check Adobes Flex 3 Help: <a href="http://livedocs.adobe.com/flex/3/html/passingarguments_6.html">&#8220;About ExternalInterface API security in Flex&#8221;</a></p>
</li>
<li>
<h2>Issues using ThunderBolt AS3 Console on Windows?</h2>
<p>What a pretty sh&#8230;y thing: The ThunderBolt AS3 Console is currently available for OS X only. There are some issues using an opened AIR app and &#8220;flashlog.txt&#8221; at the same time on Windows. Check out <a href="http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=75&#038;catid=697&amp;threadid=1368880">this entry at Adobes AIR forum</a> for more information. Hoping that Adobe will fix this issue in the future. So long, sorry for all the Windows user out there <img src='http://www.websector.de/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  . </p>
<p>BTW: Feel free to post <a href="http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=75&#038;catid=697&amp;threadid=1368880">here</a> your request to Adobes AIR team as well <img src='http://www.websector.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  </p>
</li>
</ol>
<h2>Open source!</h2>
<p>ThunderBolt AS3 and its console is open source! <a href="http://code.google.com/p/flash-thunderbolt/source/checkout">Grab the source</a>, change and adapt it. Or do whatever you want <img src='http://www.websector.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  </p>
<p>Happy logging! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.websector.de/blog/2008/06/15/10-tips-and-tricks-using-thunderbolt-as3/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>The new ThunderBolt AS3 Console based on Adobe AIR</title>
		<link>http://www.websector.de/blog/2008/06/01/the-new-thunderbolt-as3-console-based-on-adobe-air/</link>
		<comments>http://www.websector.de/blog/2008/06/01/the-new-thunderbolt-as3-console-based-on-adobe-air/#comments</comments>
		<pubDate>Sun, 01 Jun 2008 17:23:00 +0000</pubDate>
		<dc:creator>sectore</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[ThunderBolt]]></category>

		<guid isPermaLink="false">http://www.websector.de/blog/2008/06/01/the-new-thunderbolt-as3-console-based-on-adobe-air/</guid>
		<description><![CDATA[ThunderBolt AS3 is a lightweight logger extension for Flex or Flash application using Firebug. With its new tool called ThunderBolt AS3 Console, which based on Adobe AIR, it&#8217;s independent on Firebug. That&#8217;s incredible helpful for logging AIR applications using ThunderBolt AS3. Screen shots [kml_flashembed publishmethod="dynamic" fversion="9.0.28" movie="http://www.websector.de/blog/wp-includes/swf/ws-slideshow.swf" width="500" height="400" targetclass="flashmovie" menu="false" bgcolor="#FFFFFF" allowfullscreen="true" allowscriptaccess="sameDomain" fvars="XMLPath=http://www.websector.de/blog/wp-content/uploads/2008/06/01/screenshots.xml;langID=EN"] [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/flash-thunderbolt/wiki/ThunderBoltAS3">ThunderBolt AS3</a> is a lightweight logger extension for Flex or Flash application using <a href="http://www.firebug.org">Firebug</a>. With its new tool called <a href="http://code.google.com/p/flash-thunderbolt/wiki/ThunderBoltAS3Console">ThunderBolt AS3 Console</a>, which based on <a href="http://www.adobe.com/products/air/">Adobe AIR</a>, it&#8217;s independent on Firebug. That&#8217;s incredible helpful for logging AIR applications using ThunderBolt AS3.</p>
<p><span id="more-50"></span></p>
<h2>Screen shots</h2>
<p>[kml_flashembed publishmethod="dynamic" fversion="9.0.28" movie="http://www.websector.de/blog/wp-includes/swf/ws-slideshow.swf" width="500" height="400" targetclass="flashmovie" menu="false" bgcolor="#FFFFFF" allowfullscreen="true" allowscriptaccess="sameDomain" fvars="XMLPath=http://www.websector.de/blog/wp-content/uploads/2008/06/01/screenshots.xml;langID=EN"]</a><br />

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><!-- #START screenshots --></p>
<h2>Behind the scenes</h2>
<p>For logging without Firebug, ThunderBolt AS3 uses the well-known <code>trace()</code> method in a special manner, which are stored in the <a href="http://livedocs.adobe.com/flex/3/html/logging_04.html">flashlog.txt</a>. ThunderBolt AS3 Console reads this file and displays all information using different log views in a same way as Firebug it does.</p>
<p>The architecture behind this AIR application based on <a href="http://www.tombray.com/category/easymvc/">Tom Bray&#8217;s easyMVC concept</a>, which helps to build a well structured application as quick as possible using the MVC pattern.</p>
<p>ThunderBolt AS3 Console uses the following libraries as well:</p>
<ul>
<li><a href="http://developer.yahoo.com/yui/treeview/">Yahoo! UI Library TreeView</a> for the logging tree. It&#8217;s great to use this library within <a href="http://livedocs.adobe.com/flex/3/langref/mx/controls/HTML.html">the AIR based HTML component</a> for manipulating the HTML DOM using pure ActionScript <img src='http://www.websector.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  .</li>
<li>The awesome <a href="http://www.degrafa.com/">Degrafa</a> library for all the skinning stuff.</li>
</ul>
<h2>Full source available</h2>
<p>Download the <a href="http://code.google.com/p/flash-thunderbolt/downloads/list">ThunderBolt AS3 Console at Google Code</a> or check out the full source using <a href="http://flash-thunderbolt.googlecode.com/svn/trunk/as3console/">its repository</a>.</p>
<h2>Wiki pages at Google Code</h2>
<ul>
<li><a href="http://code.google.com/p/flash-thunderbolt/wiki/ThunderBoltAS3">ThunderBolt AS3 project page</a></li>
<li><a href="http://code.google.com/p/flash-thunderbolt/wiki/ThunderBoltAS3Console">ThunderBolt AS3 Console</a></li>
</ul>
<p>Happy logging! <img src='http://www.websector.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.websector.de/blog/2008/06/01/the-new-thunderbolt-as3-console-based-on-adobe-air/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>PureMVC’s &#8220;Best Practices Document&#8221; has been translated into German</title>
		<link>http://www.websector.de/blog/2008/05/11/puremvc%e2%80%99s-best-practices-document-has-been-translated-into-german/</link>
		<comments>http://www.websector.de/blog/2008/05/11/puremvc%e2%80%99s-best-practices-document-has-been-translated-into-german/#comments</comments>
		<pubDate>Sun, 11 May 2008 14:59:00 +0000</pubDate>
		<dc:creator>sectore</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PureMVC]]></category>

		<guid isPermaLink="false">http://www.websector.de/blog/2008/05/11/puremvc%e2%80%99s-best-practices-document-has-been-translated-into-german/</guid>
		<description><![CDATA[It&#8217;s done! It takes me few days to translate the great documentation called &#8220;PureMVC &#8211; Implementation, Idioms and Best Practices&#8221; published by Cliff Hall into German. Anyway, it was worth it! 52 pages about using PureMVC in a right way including examples, tips and general information using design patterns. Study this document published in English, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s done! It takes me few days to translate the great documentation called &#8220;PureMVC &#8211; Implementation, Idioms and Best Practices&#8221; published by <a href="http://futurescale.com/">Cliff Hall</a> into German. Anyway, it was worth it! 52 pages about using <a href="http://puremvc.org/">PureMVC</a> in a right way including examples, tips and general information using <a href="http://en.wikipedia.org/wiki/Design_Patterns">design patterns</a>.</p>
<p><span id="more-49"></span></p>
<p>Study this document published in <a href="http://puremvc.org/">English, France and now in German</a>, and you will have the perfect knowledge about building well structured applications based on <a href="http://www.adobe.com/products/flash/">Flash</a>, <a href="http://www.adobe.com/products/flex/">Flex</a> or <a href="http://www.adobe.com/products/air/">AIR</a> using <a href="http://puremvc.org/">PureMVC</a>. Believe me, you don&#8217;t have to dig tons of resources, blog entries or forums, just study this document!</p>
<p>Grab the the &#8220;Best Practices&#8221; at the <a href="http://puremvc.org/">official PureMVC site</a>! The German version will be there available within the next few days as well.</p>
<h2>Cover of PureMVC&#8217;s &#8220;Best Practices Document&#8221; in German</h2>
<p><img src="http://www.websector.de/blog/wp-content/uploads/2008/05/11/puremvc_doc_cover.png" width="500" height="640" alt="PureMVC - Best Practices Document in German - Cover" id="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.websector.de/blog/2008/05/11/puremvc%e2%80%99s-best-practices-document-has-been-translated-into-german/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Voices on PureMVC: An interview with Cliff Hall</title>
		<link>http://www.websector.de/blog/2008/02/11/voices-on-puremvc-an-interview-with-cliff-hall/</link>
		<comments>http://www.websector.de/blog/2008/02/11/voices-on-puremvc-an-interview-with-cliff-hall/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 09:44:39 +0000</pubDate>
		<dc:creator>sectore</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[PureMVC]]></category>

		<guid isPermaLink="false">http://www.websector.de/blog/2008/02/11/voices-on-puremvc-an-interview-with-cliff-hall/</guid>
		<description><![CDATA[Cliff Hall, the founder of the PureMVC project, has recently opened a Blog called &#8220;Voices on PureMVC&#8221; and has started a &#8220;Voices Podcast&#8221;, too. At the first episode we&#8217;ve talked about some PureMVC demos I&#8217;ve created as well as about the experiences using PureMVC in my professional work. It was a lot of fun! Check [...]]]></description>
			<content:encoded><![CDATA[<p>Cliff Hall, the founder of the <a href="http://puremvc.org/">PureMVC project</a>, has recently opened a Blog called &#8220;Voices on PureMVC&#8221; and has started a &#8220;Voices Podcast&#8221;, too. </p>
<p><a href="http://puremvc.org/content/view/70/1/">At the first episode</a> we&#8217;ve talked about some PureMVC demos I&#8217;ve created as well as about the experiences using PureMVC in my professional work. It was a lot of fun!</p>
<p><span id="more-46"></span></p>
<p><a href="http://puremvc.org/content/view/70/1/">Check it out</a> <img src='http://www.websector.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> !</p>
<p>P.S. Cliff, thanks for the great interview! I&#8217;m very proud to be a voice of PureMVC <img src='http://www.websector.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.websector.de/blog/2008/02/11/voices-on-puremvc-an-interview-with-cliff-hall/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
