<?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>rialvalue.com &#187; flex</title>
	<atom:link href="http://www.rialvalue.com/blog/tag/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rialvalue.com/blog</link>
	<description>No Flex No Fun</description>
	<lastBuildDate>Fri, 04 Feb 2011 08:09:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Carroflow. Another 3D layout for Flex4</title>
		<link>http://www.rialvalue.com/blog/2010/04/14/carroflow-another-3d-layout-for-flex4/</link>
		<comments>http://www.rialvalue.com/blog/2010/04/14/carroflow-another-3d-layout-for-flex4/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 18:59:39 +0000</pubDate>
		<dc:creator>Xavi Beumala</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[layout]]></category>

		<guid isPermaLink="false">http://www.rialvalue.com/blog/?p=157</guid>
		<description><![CDATA[This is an experiment I did a while ago when working on the Coverflow layout. I&#8217;ve been waiting to find some spare time to fine tune it, to improve it&#8217;s performance, clean the code and tweaking in general. But I know that if I don&#8217;t push it out now it will be lost in some [...]]]></description>
			<content:encoded><![CDATA[<p>This is an experiment I did a while ago when working on <a href="http://www.rialvalue.com/blog/2010/03/30/flex4-coverflow-layout/">the Coverflow layout</a>. I&#8217;ve been waiting to find some spare time to fine tune it, to improve it&#8217;s performance, clean the code and tweaking in general. But I know that if I don&#8217;t push it out now it will be lost in some random folder, so it&#8217;s better I release it as is and maybe someone can pick it from where it is ツ</p>
<p>I think this layout would be nice for Mobile devices to quickly browse content by tapping and dragging. I&#8217;ve tested it in different devices and from a usability perspective it&#8217;s very nice. I can see a big potential on it.</p>
<p>
<object width="525" height="550">
<param name="movie" value="http://www.rialvalue.com/carroflow/carroflow.swf" />
<param name="quality" value="high" />
<param name="wmode" value="window" />
<param name="menu" value="false" />
<param name="bgcolor" value="#FFFFFF" />
<param name="allowFullScreen" value="true"></param>
<embed type="application/x-shockwave-flash" width="525" height="550" src="http://www.rialvalue.com/carroflow/carroflow.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" allowFullScreen="true" ></embed>
</object>
 </p>
<p>You can check the code <a href="/carroflow/srcview">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rialvalue.com/blog/2010/04/14/carroflow-another-3d-layout-for-flex4/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Flex4 Coverflow Layout</title>
		<link>http://www.rialvalue.com/blog/2010/03/30/flex4-coverflow-layout/</link>
		<comments>http://www.rialvalue.com/blog/2010/03/30/flex4-coverflow-layout/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 16:05:06 +0000</pubDate>
		<dc:creator>Xavi Beumala</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[nexusOne]]></category>

		<guid isPermaLink="false">http://www.rialvalue.com/blog/?p=139</guid>
		<description><![CDATA[Flex4 has shipped and it comes with a ton of new features that open lots of doors. One of my preferred features in which I see a tremendous potential is the new layout mechanism.
As an exercise to better understand the details of the new layout mechanism I played a couple of days creating some layouts [...]]]></description>
			<content:encoded><![CDATA[<p>Flex4 has shipped and it comes with a ton of new features that open lots of doors. One of my preferred features in which I see a tremendous potential is the new layout mechanism.</p>
<p>As an exercise to better understand the details of the new layout mechanism I played a couple of days creating some layouts that I&#8217;ll be posting during the next days.</p>
<p>The first layout I created was a Coverflow layout. There already exist several implementations out there for Flash and even Flex. The biggest difference in this implementation is that it&#8217;s using standard 2.5D APIs and the standard Flex4 layout mechanism. This translates in a 200 lines of code and quite good performance.</p>

<a href='http://www.rialvalue.com/blog/2010/03/30/flex4-coverflow-layout/coverflow3/' title='coverflow3'><img width="150" height="150" src="http://www.rialvalue.com/blog/files/coverflow3-150x150.png" class="attachment-thumbnail" alt="" title="coverflow3" /></a>
<a href='http://www.rialvalue.com/blog/2010/03/30/flex4-coverflow-layout/coverflow2/' title='coverflow2'><img width="150" height="150" src="http://www.rialvalue.com/blog/files/coverflow2-150x150.png" class="attachment-thumbnail" alt="" title="coverflow2" /></a>
<a href='http://www.rialvalue.com/blog/2010/03/30/flex4-coverflow-layout/coverflow1/' title='coverflow1'><img width="150" height="150" src="http://www.rialvalue.com/blog/files/coverflow1-150x150.jpg" class="attachment-thumbnail" alt="" title="coverflow1" /></a>

<p>Bear in mind that:</p>
<ol>
<li>This is not production ready code and might have issues.</li>
<li>I haven&#8217;t optimised the code at all, it&#8217;s almost a first pass code.</li>
<li>The layout is not using any virtualization capabilities, which means that won&#8217;t perform nicely with big dataproviders. I&#8217;ll implement this in the future.</li>
<li>I&#8217;ve added several configuration parameters and some combinations might not work as good as others.</li>
</ol>
<p>As an extra, and even though Flex4 is not specifically designed for mobile, see how it works in a Nexus One with FP 10.1 beta. In the video below you can see how the application runs just out of the box, no recompilation, no changes at all. Same content that runs in my laptop runs in <a href="http://www.duvos.com">Enrique&#8217;s phone</a>. The performance is really nice! What the Flash Player team has achieved is amazing!<br />
congratulations guys!! </p>
<p>
<object width="480" height="320">
<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10552927&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&amp;group_id=" />
<param name="quality" value="high" />
<param name="wmode" value="window" />
<param name="menu" value="false" />
<param name="bgcolor" value="#FFFFFF" />
<param name="allowFullScreen" value="true"></param>
<embed type="application/x-shockwave-flash" width="480" height="320" src="http://vimeo.com/moogaloop.swf?clip_id=10552927&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&amp;group_id=" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" allowFullScreen="true" ></embed>
</object>
</p>
<p>You can run the application <a href="http://www.rialvalue.com/coverflow">here http://www.rialvalue.com/coverflow</a><br />
You can get the source code <a href="http://rialvalue.com/coverflow/srcview">here http://rialvalue.com/coverflow/srcview</a></p>
<p>Which parameter combination do you like more?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rialvalue.com/blog/2010/03/30/flex4-coverflow-layout/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
		<item>
		<title>Using BlazeDS  from a Flash or AS3-only project</title>
		<link>http://www.rialvalue.com/blog/2010/03/27/using-blazeds-from-a-flash-or-as3-only-project/</link>
		<comments>http://www.rialvalue.com/blog/2010/03/27/using-blazeds-from-a-flash-or-as3-only-project/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 11:54:28 +0000</pubDate>
		<dc:creator>Xavi Beumala</dc:creator>
				<category><![CDATA[blazeds]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[lcds]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[remoting]]></category>
		<category><![CDATA[rpc]]></category>

		<guid isPermaLink="false">http://www.rialvalue.com/blog/?p=116</guid>
		<description><![CDATA[Some weeks ago I had to develop a light version of an existing Flex application. The Flex application consumed lot of Java logic through services exposed by BlazeDS&#8217;s RemoteObjects. 
The goal was to be able to consume, from the new application, the exact same Java Services that the Flex application was consuming through RemoteObjects without [...]]]></description>
			<content:encoded><![CDATA[<p>Some weeks ago I had to develop a light version of an existing Flex application. The Flex application consumed lot of Java logic through services exposed by BlazeDS&#8217;s RemoteObjects. </p>
<p>The goal was to be able to consume, from the new application, the exact same Java Services that the Flex application was consuming through RemoteObjects without modifying the Java code or the server gateway at all.</p>
<p>This scenario could be a very common scenario in the near future when porting, adapting or extending existing applications to different devices targetting Flash Player 10.1. </p>
<p>BlazeDS uses some kind of handshake between the client and the server as well as control messages that were not obvious to replicate in a custom implementation using a plain NetConnection object. Also I wanted to make use of the several more complicated features that Flex rpc implementation brings.</p>
<p>Basically the problem became to  <strong>&#8220;How could I use the entire component set from rpc.swc distributed with Flex SDK in a Flash or AS3-only project?&#8221;</strong></p>
<p>This excercise is also applicable to WebService, HttpService, Consumer or Producer (messaging) classes.<br />
<span id="more-116"></span></p>
<h3>Step 1.</h3>
<p> Add rpc.swc from {FLEX_HOME}/framework/libs to your project or .fla classpath </p>
<h3>Step 2</h3>
<p> Compile some simple code using RemoteObjects:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">const ENDPOINT <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;http://your.domain/messagebroker/amf&quot;</span><span style="color: #000066; font-weight: bold;">;</span><br />
const DESTINATION <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;workflowService&quot;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
remoteObject = <span style="color: #0033ff; font-weight: bold;">new</span> RemoteObject<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
remoteObject<span style="color: #000066; font-weight: bold;">.</span>destination = DESTINATION<span style="color: #000066; font-weight: bold;">;</span><br />
remoteObject<span style="color: #000066; font-weight: bold;">.</span>endpoint = ENDPOINT<span style="color: #000066; font-weight: bold;">;</span><br />
remoteObject<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span> ResultEvent<span style="color: #000066; font-weight: bold;">.</span>RESULT<span style="color: #000066; font-weight: bold;">,</span> resultHandler <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
remoteObject<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span> FaultEvent<span style="color: #000066; font-weight: bold;">.</span>FAULT<span style="color: #000066; font-weight: bold;">,</span> faultHandler <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
remoteObject<span style="color: #000066; font-weight: bold;">.</span>findAll<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<p>Compiling this code throws several different errors due to unsatisfied or missing dependencies:</p>
<p><quote>mx.logging.ILogger<br />
mx.rpc.IResponder<br />
</quote></p>
<p>These 2 classes are in framework.swc Copying the swc from the FlexSDK into your classpath will fix the issues.</p>
<h3>Step 3</h3>
<p> After that you&#8217;ll get errors due to missing resource bundles like:<br />
&#8220;Unable to resolve resource bundle &#8216;collections&#8217; for locale &#8216;en_US&#8217;&#8221;</p>
<p>Copying to the classpath the required resource bundles from {FLEX_SDK}/frameworks/locale/ will fix the problem. You&#8217;ll only need to copy rpc_rb.swc and framework_rb.swc</p>
<p>You will receive this error only if compiling the project using the Flex compiler. You won&#8217;t get this error if you compile your application in Flash.</p>
<h3>Step 4</h3>
<p> When the application finally compiles you&#8217;ll always get FaultEvents with not too much information. </p>
<p><quote>faultCode: &#8220;Client.Error.MessageSend&#8221;<br />
faultDetail: &#8220;Channel.Connect.Failed error null url: &#8216;null&#8217;&#8221;<br />
</quote></p>
<p>Using Charles I realized that the request was not even sent, something was  going wrong.</p>
<h3>Step 5</h3>
<p>  All RPC classes use the Flex logging API so enabling it in the Flash project could be helpful. To enable it we only need to add:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Log<span style="color: #000066; font-weight: bold;">.</span>addTarget<span style="color: #000000;">&#40;</span> <span style="color: #0033ff; font-weight: bold;">new</span> TraceTarget<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<h3>Step 6</h3>
<p> After a couple of hours of debugging I discovered that RPC library to properly work needs to be initialized in the following way:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=loaderinfo%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:loaderinfo.html"><span style="color: #004993;">LoaderInfo</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>core<span style="color: #000066; font-weight: bold;">.</span>mx_internal<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>messaging<span style="color: #000066; font-weight: bold;">.</span>config<span style="color: #000066; font-weight: bold;">.</span>LoaderConfig<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
use <span style="color: #004993;">namespace</span> mx_internal<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
LoaderConfig<span style="color: #000066; font-weight: bold;">.</span>mx_internal<span style="color: #000066; font-weight: bold;">::</span>_url = <span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">;</span><br />
LoaderConfig<span style="color: #000066; font-weight: bold;">.</span>mx_internal<span style="color: #000066; font-weight: bold;">::</span>_parameters = <span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parameters</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<p>Where loaderInfo is the loaderInfo object of the root Sprite of your application.</p>
<p>After adding the initialization code you will see the request going through in Charles.</p>
<h3>Step 7</h3>
<p> There&#8217;s still one last problem to solve:</p>
<p><quote>&#8220;TypeError: Error #1034: Type Coercion failed: cannot convert Object@20612a79 to mx.messaging.messages.ErrorMessage.&#8221;<br />
</quote></p>
<p>The error means that somewhere an ErrorMessage object was expected but instead an object of type Object is received. We need to register several types. This will happen with several different types of ojects. To solve it:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;flex.messaging.messages.ErrorMessage&quot;</span><span style="color: #000066; font-weight: bold;">,</span> ErrorMessage<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;flex.messaging.messages.CommandMessage&quot;</span><span style="color: #000066; font-weight: bold;">,</span> CommandMessage<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;flex.messaging.messages.RemotingMessage&quot;</span><span style="color: #000066; font-weight: bold;">,</span> RemotingMessage<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;flex.messaging.messages.AcknowledgeMessage &quot;</span><span style="color: #000066; font-weight: bold;">,</span> AcknowledgeMessage<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;DSC&quot;</span><span style="color: #000066; font-weight: bold;">,</span> CommandMessageExt<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;DSK&quot;</span><span style="color: #000066; font-weight: bold;">,</span> AcknowledgeMessageExt<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;flex.messaging.config.ConfigMap&quot;</span><span style="color: #000066; font-weight: bold;">,</span> ConfigMap<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;flex.messaging.io.ArrayCollection&quot;</span><span style="color: #000066; font-weight: bold;">,</span> ArrayCollection<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;flex.messaging.io.ObjectProxy&quot;</span><span style="color: #000066; font-weight: bold;">,</span> ObjectProxy<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<p>After properly registering these classes everything should work as expected (the list of required registrations might not be complete, if you find a TypeCoercion error consider registering the object).</p>
<p>The entire code you need:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;height:330px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span style="color: #004993;">Event</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">registerClassAlias</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>collections<span style="color: #000066; font-weight: bold;">.</span>ArrayCollection<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>core<span style="color: #000066; font-weight: bold;">.</span>mx_internal<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>logging<span style="color: #000066; font-weight: bold;">.</span>Log<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>logging<span style="color: #000066; font-weight: bold;">.</span>targets<span style="color: #000066; font-weight: bold;">.</span>TraceTarget<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>messaging<span style="color: #000066; font-weight: bold;">.</span>config<span style="color: #000066; font-weight: bold;">.</span>ConfigMap<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>messaging<span style="color: #000066; font-weight: bold;">.</span>config<span style="color: #000066; font-weight: bold;">.</span>LoaderConfig<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>messaging<span style="color: #000066; font-weight: bold;">.</span>messages<span style="color: #000066; font-weight: bold;">.</span>AcknowledgeMessage<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>messaging<span style="color: #000066; font-weight: bold;">.</span>messages<span style="color: #000066; font-weight: bold;">.</span>AcknowledgeMessageExt<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>messaging<span style="color: #000066; font-weight: bold;">.</span>messages<span style="color: #000066; font-weight: bold;">.</span>CommandMessage<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>messaging<span style="color: #000066; font-weight: bold;">.</span>messages<span style="color: #000066; font-weight: bold;">.</span>CommandMessageExt<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>messaging<span style="color: #000066; font-weight: bold;">.</span>messages<span style="color: #000066; font-weight: bold;">.</span>ErrorMessage<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>messaging<span style="color: #000066; font-weight: bold;">.</span>messages<span style="color: #000066; font-weight: bold;">.</span>RemotingMessage<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>rpc<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>FaultEvent<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>rpc<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>ResultEvent<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>rpc<span style="color: #000066; font-weight: bold;">.</span>remoting<span style="color: #000066; font-weight: bold;">.</span>RemoteObject<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>utils<span style="color: #000066; font-weight: bold;">.</span>ObjectProxy<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
use <span style="color: #004993;">namespace</span> mx_internal<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
const ENDPOINT <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;http://your.domain/messagebroker/amf&quot;</span><span style="color: #000066; font-weight: bold;">;</span><br />
const DESTINATION <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;workflowService&quot;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #6699cc; font-weight: bold;">var</span> remoteObject <span style="color: #000066; font-weight: bold;">:</span> RemoteObject<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #339966; font-weight: bold;">function</span> registerObjects<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;flex.messaging.messages.ErrorMessage&quot;</span><span style="color: #000066; font-weight: bold;">,</span> ErrorMessage <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;flex.messaging.messages.CommandMessage&quot;</span><span style="color: #000066; font-weight: bold;">,</span> CommandMessage <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;flex.messaging.messages.RemotingMessage&quot;</span><span style="color: #000066; font-weight: bold;">,</span> RemotingMessage <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;flex.messaging.messages.AcknowledgeMessage &quot;</span><span style="color: #000066; font-weight: bold;">,</span> AcknowledgeMessage <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;DSC&quot;</span><span style="color: #000066; font-weight: bold;">,</span> CommandMessageExt <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;DSK&quot;</span><span style="color: #000066; font-weight: bold;">,</span> AcknowledgeMessageExt <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;flex.messaging.config.ConfigMap&quot;</span><span style="color: #000066; font-weight: bold;">,</span> ConfigMap <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;flex.messaging.io.ArrayCollection&quot;</span><span style="color: #000066; font-weight: bold;">,</span> ArrayCollection <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;flex.messaging.io.ObjectProxy&quot;</span><span style="color: #000066; font-weight: bold;">,</span> ObjectProxy <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<br />
<span style="color: #339966; font-weight: bold;">function</span> initializeRPC<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; LoaderConfig<span style="color: #000066; font-weight: bold;">.</span>mx_internal<span style="color: #000066; font-weight: bold;">::</span>_url = <span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; LoaderConfig<span style="color: #000066; font-weight: bold;">.</span>mx_internal<span style="color: #000066; font-weight: bold;">::</span>_parameters = <span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parameters</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<br />
<span style="color: #339966; font-weight: bold;">function</span> initializeLogging<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; Log<span style="color: #000066; font-weight: bold;">.</span>addTarget<span style="color: #000000;">&#40;</span> <span style="color: #0033ff; font-weight: bold;">new</span> TraceTarget<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<br />
<span style="color: #339966; font-weight: bold;">function</span> createRemoteObject<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; remoteObject = <span style="color: #0033ff; font-weight: bold;">new</span> RemoteObject<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; remoteObject<span style="color: #000066; font-weight: bold;">.</span>destination = DESTINATION<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; remoteObject<span style="color: #000066; font-weight: bold;">.</span>endpoint = ENDPOINT<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; remoteObject<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span> ResultEvent<span style="color: #000066; font-weight: bold;">.</span>RESULT<span style="color: #000066; font-weight: bold;">,</span> resultHandler <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; remoteObject<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span> FaultEvent<span style="color: #000066; font-weight: bold;">.</span>FAULT<span style="color: #000066; font-weight: bold;">,</span> faultHandler <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; remoteObject<span style="color: #000066; font-weight: bold;">.</span>findAll<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<br />
<span style="color: #339966; font-weight: bold;">function</span> resultHandler<span style="color: #000000;">&#40;</span> event <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span style="color: #004993;">Event</span></a> <span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;invocation successful&quot;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<br />
<span style="color: #339966; font-weight: bold;">function</span> faultHandler<span style="color: #000000;">&#40;</span> event <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span style="color: #004993;">Event</span></a> <span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;invocation failed&quot;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
registerObjects<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
initializeLogging<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
initializeRPC<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
createRemoteObject<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<h2>Pros and cons of the solution </h2>
<ul>
<li>~100Kb footprint</li>
<li>You can focus on adding value and not building the infrastructure.</li>
<li>Faster time to market</li>
<li>Solid market solution</li>
</ul>
<h2>Improvement points</h2>
<p>Using the above solution you&#8217;ll have to work with ArrayCollection instead of Arrays which in certain situations might not be necessary, might have a performance impact as well as increase the number of class dependencies and file size.</p>
<p>One possible way to get rid of ArrayCollection and all its dependencies (i.e. ListCollectionView, Cursor, SystemManager, etc.) would be to create your own map. Instead of using:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;flex.messaging.io.ArrayCollection&quot;</span><span style="color: #000066; font-weight: bold;">,</span> ArrayCollection <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<p>You could use:</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #004993;">registerClassAlias</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;flex.messaging.io.ArrayCollection&quot;</span><span style="color: #000066; font-weight: bold;">,</span> YourClass <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<p>Where your class would implement IExternalizable. This class could be completely light and would mean a considerable improvement in terms of dependencies and lighter implementation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rialvalue.com/blog/2010/03/27/using-blazeds-from-a-flash-or-as3-only-project/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Logging and catching (async) exceptions during invalidation</title>
		<link>http://www.rialvalue.com/blog/2009/08/25/logging-and-catching-exceptions-during-invalidation/</link>
		<comments>http://www.rialvalue.com/blog/2009/08/25/logging-and-catching-exceptions-during-invalidation/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 12:21:44 +0000</pubDate>
		<dc:creator>Xavi Beumala</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[error handling]]></category>
		<category><![CDATA[logging]]></category>

		<guid isPermaLink="false">http://www.rialvalue.com/blog/?p=81</guid>
		<description><![CDATA[Sometimes, due to many different reasons, there&#8217;re exceptions that happen during the invalidation/validation cycle of the flex SDK. Most times these exceptions end up being unveiled in the very core of the SDK, being not possible to catch them up because their async nature and the place where they happen.
The stacktrace of these exceptiosn, normally, [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, due to many different reasons, there&#8217;re exceptions that happen during the invalidation/validation cycle of the flex SDK. Most times these exceptions end up being unveiled in the very core of the SDK, being not possible to catch them up because their async nature and the place where they happen.</p>
<p>The stacktrace of these exceptiosn, normally, looks like the lines below:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">...<br />
at mx.core::UIComponent/validateProperties()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:5807]<br />
at mx.managers::LayoutManager/validateProperties()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:539]<br />
at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:689]<br />
at Function/http://adobe.com/AS3/2006/builtin::apply()<br />
at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8633]<br />
at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8582]</div></div>
<p>Today, snooping around the UIComponent class, I&#8217;ve found a nice unexpected thing. Basically the invalidation pattern in the SDK is built around the LayoutManager and the UIComponent classes. The callLater method is the responsible to delay the execution of certain functionalities to the next frame. callLater implementation relies on the RENDER and ENTER_FRAME frames. The handler for these events is the method callLaterDispatcher.</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;height:330px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900; font-style: italic;">// At run-time, callLaterDispatcher2() is called</span><br />
<span style="color: #009900; font-style: italic;">// without a surrounding try-catch.</span><br />
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;">!</span>UIComponentGlobals<span style="color: #000066; font-weight: bold;">.</span>catchCallLaterExceptions<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; callLaterDispatcher2<span style="color: #000000;">&#40;</span>event<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// At design-time, callLaterDispatcher2() is called</span><br />
<span style="color: #009900; font-style: italic;">// with a surrounding try-catch.</span><br />
<span style="color: #0033ff; font-weight: bold;">else</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">try</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; callLaterDispatcher2<span style="color: #000000;">&#40;</span>event<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">catch</span><span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=error%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:error.html"><span style="color: #004993;">Error</span></a><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> callLaterErrorEvent<span style="color: #000066; font-weight: bold;">:</span>DynamicEvent = <span style="color: #0033ff; font-weight: bold;">new</span> DynamicEvent<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;callLaterError&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; callLaterErrorEvent<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">error</span> = e<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; systemManager<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#40;</span>callLaterErrorEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Here&#8217;s the surprise. If UIComponentGlobals.catchCallLaterExceptions is true, the execution of the validation cycle will be wrapped with a try..catch and a DynamicEvent will be dispatched through the systemManager with information about the error.</p>
<p>This opens the doors for at least catch the error and log it. In some cases, depending on the severity of the error and if the application is not too corrupted, we&#8217;ll even be able to display a message to the user notifying him the error. This is not a fix to <a href="http://bugs.adobe.com/jira/browse/FP-1499">FP-1499</a> nor <a href="http://bugs.adobe.com/jira/browse/FP-444">FP-444</a> but under some circumstances it can be really helpful if combined with <a href="http://blogs.adobe.com/tomsugden/2009/08/best_practices_for_the_flex_lo.html">great logging practices as explained by Tom</a>.</p>
<p>I&#8217;ve created a simple class that hooks into the systemManager, listens for the callLaterError event and logs it using the standard SDK logging mechanism. The AsyncErrorLogger is MXML friendly so that it can be instantiated in the root application. It provides an enable property to switch the behavior on and off. Additionally the property redispatchErrorEvent, which by default is false, redispatches the error causing the traditional flash player error dialog to appear (in debugger player versions) and not fail silently.</p>
<p>Here&#8217;s an example on how to use it:</p>
<div class="codecolorer-container xml mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;height:330px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> version = <span style="color: #ff0000;">&quot;1.0&quot;</span> encoding = <span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:WindowedApplication</span> xmlns:mx = <span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> xmlns:utils = <span style="color: #ff0000;">&quot;com.adobe.ac.utils.*&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">&lt;![CDATA[</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;import mx.logging.LogEventLevel;</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//---------------------------------------------</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// THAT'S THE WAY TO SIMULATE THE ASYNC ERROR</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//---------------------------------------------</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;private var doItChange : Boolean = false;</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;private function doIt() : void </span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;doItChange = true;</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;invalidateProperties();</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;override protected function commitProperties() : void{</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;super.commitProperties();</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if( doItChange )</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;doItChange = false;</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;throw new Error(&quot;CallLater exception&quot;);</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</span><br />
<span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp;]]&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:TraceTarget</span> level = <span style="color: #ff0000;">&quot;{ LogEventLevel.ALL }&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;utils:AsyncErrorLogger</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Button</span> click = <span style="color: #ff0000;">&quot;doIt()&quot;</span> label = <span style="color: #ff0000;">&quot;Throw exception&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:WindowedApplication<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>Here&#8217;s the code. <a href="http://www.rialvalue.com/downloads/AsyncErrorLogger.as">You can download the class from here as well</a>.</p>
<div class="codecolorer-container actionscript3 mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:515px;height:330px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #9900cc; font-weight: bold;">package</span> com<span style="color: #000066; font-weight: bold;">.</span>adobe<span style="color: #000066; font-weight: bold;">.</span>ac<span style="color: #000066; font-weight: bold;">.</span>utils<br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=errorevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:errorevent.html"><span style="color: #004993;">ErrorEvent</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=eventdispatcher%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:eventdispatcher.html"><span style="color: #004993;">EventDispatcher</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>core<span style="color: #000066; font-weight: bold;">.</span>Application<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>core<span style="color: #000066; font-weight: bold;">.</span>UIComponentGlobals<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>DynamicEvent<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>FlexEvent<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>logging<span style="color: #000066; font-weight: bold;">.</span>ILogger<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>logging<span style="color: #000066; font-weight: bold;">.</span>Log<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>managers<span style="color: #000066; font-weight: bold;">.</span>ISystemManager<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000;">&#91;</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span style="color: #004993;">Event</span></a><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;error&quot;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">type</span>=<span style="color: #990000;">&quot;flash.events.ErrorEvent&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> AsyncErrorLogger <span style="color: #0033ff; font-weight: bold;">extends</span> <a href="http://www.google.com/search?q=eventdispatcher%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:eventdispatcher.html"><span style="color: #004993;">EventDispatcher</span></a><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//------------------------------------------------------------------------</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// &nbsp;Constants</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//------------------------------------------------------------------------</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> static const CALL_LATER_ERROR<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;callLaterError&quot;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> static const LOG<span style="color: #000066; font-weight: bold;">:</span>ILogger = Log<span style="color: #000066; font-weight: bold;">.</span>getLogger<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;com.adobe.cairngorm.AsyncErrorLogger&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//------------------------------------------------------------------------</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// &nbsp;Properties</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//------------------------------------------------------------------------</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//-------------------------------</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// &nbsp;systemManager</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//-------------------------------</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> systemManager<span style="color: #000066; font-weight: bold;">:</span>ISystemManager<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//-------------------------------</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// &nbsp;logStackTrace</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//-------------------------------</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> logStackTrace<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=boolean%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:boolean.html"><span style="color: #004993;">Boolean</span></a> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//-------------------------------</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// &nbsp;redispatchError</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//-------------------------------</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> redispatchError<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=boolean%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:boolean.html"><span style="color: #004993;">Boolean</span></a> = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//-------------------------------</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// &nbsp;enabled</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//-------------------------------</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span>Bindable<span style="color: #000000;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> <span style="color: #004993;">enabled</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=boolean%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:boolean.html"><span style="color: #004993;">Boolean</span></a><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span> UIComponentGlobals<span style="color: #000066; font-weight: bold;">.</span>catchCallLaterExceptions<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> <span style="color: #004993;">enabled</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=boolean%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:boolean.html"><span style="color: #004993;">Boolean</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UIComponentGlobals<span style="color: #000066; font-weight: bold;">.</span>catchCallLaterExceptions = <span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//------------------------------------------------------------------------</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// &nbsp;Constructor</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//------------------------------------------------------------------------</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> AsyncErrorLogger<span style="color: #000000;">&#40;</span>systemManager<span style="color: #000066; font-weight: bold;">:</span>ISystemManager = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">enabled</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span>systemManager<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//------------------------------------------------------------------------</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// &nbsp;Private Methods</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//------------------------------------------------------------------------</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span>systemManager<span style="color: #000066; font-weight: bold;">:</span>ISystemManager<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>systemManager<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; initializeListener<span style="color: #000000;">&#40;</span>systemManager<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> application<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a> = Application<span style="color: #000066; font-weight: bold;">.</span>application<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;">!</span>application<span style="color: #000066; font-weight: bold;">.</span>initialized<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; application<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>FlexEvent<span style="color: #000066; font-weight: bold;">.</span>CREATION_COMPLETE<span style="color: #000066; font-weight: bold;">,</span> creationCompleteHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; initializeListener<span style="color: #000000;">&#40;</span>application<span style="color: #000066; font-weight: bold;">.</span>systemManager<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> creationCompleteHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span style="color: #004993;">Event</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> application<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html"><span style="color: #004993;">Object</span></a> = Application<span style="color: #000066; font-weight: bold;">.</span>application<span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; application<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span>FlexEvent<span style="color: #000066; font-weight: bold;">.</span>INIT_COMPLETE<span style="color: #000066; font-weight: bold;">,</span> creationCompleteHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; initializeListener<span style="color: #000000;">&#40;</span>application<span style="color: #000066; font-weight: bold;">.</span>systemManager<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> initializeListener<span style="color: #000000;">&#40;</span>systemManager<span style="color: #000066; font-weight: bold;">:</span>ISystemManager<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>systemManager = systemManager<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>systemManager<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LOG<span style="color: #000066; font-weight: bold;">.</span>debug<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;AsynErrorLogger initialized.&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>systemManager<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>CALL_LATER_ERROR<span style="color: #000066; font-weight: bold;">,</span> errorHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> errorHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span>DynamicEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">error</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=error%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:error.html"><span style="color: #004993;">Error</span></a> = event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">error</span> <span style="color: #0033ff; font-weight: bold;">as</span> <a href="http://www.google.com/search?q=error%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:error.html"><span style="color: #004993;">Error</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LOG<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">error</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;{0}&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">error</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">message</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>logStackTrace<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LOG<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">error</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">error</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getStackTrace</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>redispatchError<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> errorEvent<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=errorevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:errorevent.html"><span style="color: #004993;">ErrorEvent</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=errorevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:errorevent.html"><span style="color: #004993;">ErrorEvent</span></a><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=errorevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:errorevent.html"><span style="color: #004993;">ErrorEvent</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ERROR</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">error</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getStackTrace</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">error</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">errorID</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#40;</span>errorEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.rialvalue.com/blog/2009/08/25/logging-and-catching-exceptions-during-invalidation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hello Gumbo presentation</title>
		<link>http://www.rialvalue.com/blog/2009/06/09/hello-gumbo-presentation/</link>
		<comments>http://www.rialvalue.com/blog/2009/06/09/hello-gumbo-presentation/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 22:06:49 +0000</pubDate>
		<dc:creator>Xavi Beumala</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[gumbo]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[spark]]></category>

		<guid isPermaLink="false">http://www.rialvalue.com/blog/?p=10</guid>
		<description><![CDATA[Here are the slides and sample files I used for the Hello Gumbo presentation I did for the Spanish Flex User group in the context of the Global AUG tour.






















 











Here&#8217;s the source code for the examples.
]]></description>
			<content:encoded><![CDATA[<p>Here are the slides and sample files I used for the <strong>Hello Gumbo presentation</strong> I did for the <a href="http://www.madeinflex.com/">Spanish Flex User group</a> in the context of the Global AUG tour.</p>
<p>
<object width="525" height="400">
<param name="movie" value="https://share.acrobat.com/adc/flex/mpt.swf" />
<param name="quality" value="high" />
<param name="wmode" value="window" />
<param name="menu" value="false" />
<param name="bgcolor" value="#FFFFFF" />
<param name="allowFullScreen" value="true"></param>
<param name="flashvars" value="ext=pdf&docId=f35f34dc-d6ff-4b4b-abf1-9caa95b25ab7&lang=en_US"></param>
<embed type="application/x-shockwave-flash" width="525" height="400" src="https://share.acrobat.com/adc/flex/mpt.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" allowFullScreen="true" flashvars="ext=pdf&docId=f35f34dc-d6ff-4b4b-abf1-9caa95b25ab7&lang=en_US" ></embed>
</object>
</p>
<p>
<object width="525" height="180">
<param name="movie" value="/blog/files/presentations/mifoIVGumbo/Button2.swf" />
<param name="quality" value="high" />
<param name="wmode" value="window" />
<param name="menu" value="false" />
<param name="bgcolor" value="#FFFFFF" />
<param name="allowFullScreen" value="true"></param>
<embed type="application/x-shockwave-flash" width="525" height="180" src="/blog/files/presentations/mifoIVGumbo/Button2.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" allowFullScreen="true" ></embed>
</object>
 </p>
<p>
<object width="525" height="300">
<param name="movie" value="/blog/files/presentations/mifoIVGumbo/ListSkinning2.swf" />
<param name="quality" value="high" />
<param name="wmode" value="window" />
<param name="menu" value="false" />
<param name="bgcolor" value="#FFFFFF" />
<param name="allowFullScreen" value="true"></param>
<embed type="application/x-shockwave-flash" width="525" height="300" src="/blog/files/presentations/mifoIVGumbo/ListSkinning2.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" allowFullScreen="true" ></embed>
</object>
</p>
<p><a href="/blog/files/presentations/mifoIVGumbo/gumboWorkspace.zip">Here&#8217;s the source code for the examples.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rialvalue.com/blog/2009/06/09/hello-gumbo-presentation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

