<?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>Tom Cornilliac &#187; Tom Cornilliac</title>
	<atom:link href="http://www.tomcornilliac.com/author/tomcornilliac/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tomcornilliac.com</link>
	<description>Flex, AIR and Rich Internet Goodness</description>
	<lastBuildDate>Wed, 17 Jun 2009 15:40:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Configuring the IntelliJ IDEA JVM on OS X</title>
		<link>http://www.tomcornilliac.com/2009/06/configuring-the-intellij-idea-jvm-on-os-x/</link>
		<comments>http://www.tomcornilliac.com/2009/06/configuring-the-intellij-idea-jvm-on-os-x/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 20:45:33 +0000</pubDate>
		<dc:creator>Tom Cornilliac</dc:creator>
				<category><![CDATA[IDE]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[IntelliJ IDEA]]></category>
		<category><![CDATA[JVM]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.tomcornilliac.com/?p=86</guid>
		<description><![CDATA[Out of the box the JVM arguments for IntelliJ IDEA need a bit of tweaking if you plan on doing any serious development. Lately, in addition to Flex 4,  I&#8217;ve been cutting my teeth on Groovy and Grails and I&#8217;ve found IDEA&#8217;s 256mb default heap size to be barely adequate for the task. Bringing the [...]]]></description>
			<content:encoded><![CDATA[<p>Out of the box the JVM arguments for <a href="http://www.jetbrains.com/idea/">IntelliJ IDEA</a> need a bit of tweaking if you plan on doing any serious development. Lately, in addition to Flex 4,  I&#8217;ve been cutting my teeth on <a href="http://groovy.codehaus.org/">Groovy</a> and <a href="http://grails.org/">Grails</a> and I&#8217;ve found IDEA&#8217;s 256mb default heap size to be barely adequate for the task. Bringing the heap maximum up to 512mb (-Xmx512m) makes a huge difference in how the IDE and framework perform.</p>
<p>When I went Googling for information on how to set the IDEA JVM on OS X I assumed I would find a wealth of information for said task. Turns out I was both right and wrong. There is a wealth of information but it&#8217;s all for Windows and since the IDEA config under Windows is different than OS X I was left wanting. In the end I was able to Google one lonely site with the correct information for OS X but the site was offline and I ended up having to use Google cache to get the information. Hopefully this post will help the next poor soul who goes looking for how to set the IDEA JVM heap maximum under OS X.</p>
<ol>
<li style="text-align: left;"><strong>Locate the App</strong>. If you have a standard installation it will be under /Applications<br />
<a href="http://www.tomcornilliac.com/wp-content/uploads/2009/06/idea_jvm_edit1.png" rel="lightbox[86]"><img class="size-medium wp-image-87 alignnone" title="idea_jvm_edit1" src="http://www.tomcornilliac.com/wp-content/uploads/2009/06/idea_jvm_edit1-300x49.png" alt="Using Finder select the App file" width="300" height="49" /></a><br />
<span style="color: #ffffff;">.<br />
.</span></li>
<li><strong>Open the App package<br />
<a href="http://www.tomcornilliac.com/wp-content/uploads/2009/06/idea_jvm_edit2.png" rel="lightbox[86]"><img class="size-medium wp-image-88 alignnone" title="idea_jvm_edit2" src="http://www.tomcornilliac.com/wp-content/uploads/2009/06/idea_jvm_edit2-300x157.png" alt="idea_jvm_edit2" width="300" height="157" /></a><br />
<span style="color: #ffffff;">.<br />
.</span></strong></p>
<p><strong> </strong></li>
<li><strong>Using your text editor of choice open the info.plist file under &#8220;contents&#8221;<br />
<a href="http://www.tomcornilliac.com/wp-content/uploads/2009/06/Idea_jvm_edit3.png" rel="lightbox[86]"><img class="size-medium wp-image-89 alignnone" title="Idea_jvm_edit3" src="http://www.tomcornilliac.com/wp-content/uploads/2009/06/Idea_jvm_edit3-300x162.png" alt="Idea_jvm_edit3" width="300" height="162" /></a><br />
<span style="color: #ffffff;">.<br />
.</span></strong></p>
<p><strong> </strong></li>
<li><strong>Edit the &#8220;VMOptions&#8221; key.</strong> I have my heap maximum set at 512mb and my minimum at 64mb<strong><br />
<a href="http://www.tomcornilliac.com/wp-content/uploads/2009/06/idea_jvm_edit4.png" rel="lightbox[86]"><img class="size-medium wp-image-90 alignnone" title="idea_jvm_edit4" src="http://www.tomcornilliac.com/wp-content/uploads/2009/06/idea_jvm_edit4-300x107.png" alt="idea_jvm_edit4" width="300" height="107" /></a></strong></li>
</ol>
<p>That&#8217;s it. Restart IDEA if it&#8217;s running and you should see your heap changes in right corner of the application status bar.</p>
<p>By the way, if you&#8217;re doing any Groovy or Grails development, IntelliJ IDEA is a fantastic IDE with undoubtedly the best Grails support around.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomcornilliac.com/2009/06/configuring-the-intellij-idea-jvm-on-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using SwizConfig with Flex 4</title>
		<link>http://www.tomcornilliac.com/2009/06/using-swizconfig-with-flex-4/</link>
		<comments>http://www.tomcornilliac.com/2009/06/using-swizconfig-with-flex-4/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 16:11:32 +0000</pubDate>
		<dc:creator>Tom Cornilliac</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[Swiz]]></category>

		<guid isPermaLink="false">http://www.tomcornilliac.com/?p=65</guid>
		<description><![CDATA[I recently started my first Flex 4 project using the Swiz framework. After setting up my main application class to use SwizConfig and compiling I was greeted with this error. &#8220;In initializer for &#8216;mxmlContentFactory&#8217;, type org.swizframework.SwizConfig is not assignable to target type Array or target element type mx.core.IVisualElement&#8221; The solution: Flex 4 introduced a new [...]]]></description>
			<content:encoded><![CDATA[<p>I recently started my first Flex 4 project using the <a href="http://www.swizframework.org">Swiz framework</a>. After setting up my main application class to use SwizConfig and compiling I was greeted with this error.</p>
<blockquote><p><span style="color: #000000;"><strong>&#8220;In initializer for &#8216;mxmlContentFactory&#8217;, type org.swizframework.SwizConfig is not assignable to target type Array or target element type mx.core.IVisualElement&#8221;</strong></span></p></blockquote>
<p>The solution: Flex 4 introduced a new method of grouping non-visual elements together <span style="color: #0000ff;">&lt;fx:Declarations&gt;</span>. In Flex 4 non-visual elements such as formatters, validators, effects etc. need to be grouped within a <span style="color: #0000ff;">&lt;fx:Declarations&gt;</span> section. So if you&#8217;re using Flex 4 (Gumbo) your SwizConfig would look something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:WindowedApplication</span></span>
<span style="color: #000000;">	xmlns:swiz=<span style="color: #ff0000;">&quot;http://swiz.swizframework.org&quot;</span></span>
<span style="color: #000000;">	xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">	xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">	xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;swiz:SwizConfig</span> </span>
<span style="color: #000000;">			viewPackages=<span style="color: #ff0000;">&quot;com.myapp.views&quot;</span></span>
<span style="color: #000000;">			eventPackages=<span style="color: #ff0000;">&quot;com.myapp.events&quot;</span></span>
<span style="color: #000000;">			strict=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">			beanLoaders=<span style="color: #ff0000;">&quot;{[Beans]}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:WindowedApplication</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.tomcornilliac.com/2009/06/using-swizconfig-with-flex-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix for Eclipse 3.3 Crashing under OS X Leopard</title>
		<link>http://www.tomcornilliac.com/2008/02/fix-for-eclipse-33-crashing-under-osx-leopard/</link>
		<comments>http://www.tomcornilliac.com/2008/02/fix-for-eclipse-33-crashing-under-osx-leopard/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 16:42:09 +0000</pubDate>
		<dc:creator>Tom Cornilliac</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Flex Builder]]></category>

		<guid isPermaLink="false">http://www.cornilliac.com/blog/2008/02/53/</guid>
		<description><![CDATA[Earlier this week I discovered a keyboard shortcut that will crash Eclipse on Mac OS X Leopard. There&#8217;s a fix for the problem so I wanted to blog the solution for any and all that might stumble across this issue in the future. To be clear, as far as I can tell the bug only [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this week I discovered a keyboard shortcut that will crash Eclipse on Mac OS X Leopard. There&#8217;s a fix for the problem so I wanted to blog the solution for any and all that might stumble across this issue in the future.</p>
<p>To be clear, as far as I can tell the bug only affects Eclipse 3.3 running on Leopard, although you may want to test your Mac environment just to be sure.</p>
<p>The bug shows itself when you use the Open Resource shortcut (CMD+SHIFT+R) or the Open Class (CMD+SHIFT+T) shortcut, once you&#8217;ve selected your file or class Eclipse will crash. At first I thought that this was a Flex Builder bug, Adobe even <a href="http://bugs.adobe.com/jira/browse/FB-10935">has a bug filed for this exact problem</a> but after more research it turns out that the bug is an <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=207827">SWT issue in Eclipse</a>. </p>
<p>Thankfully Eclipse has already resolved this issue in the 3.3.2 stream build so if this is an issue for you then <a href="http://download.eclipse.org/eclipse/downloads/">download the 3.3.2 stream build</a> and update your existing Eclipse installation. I&#8217;ve tested Flex Builder 3.0 plugin final on 3.3.2 and it appears to run without issue. If you&#8217;re running Flex Builder 3.0 standalone then you&#8217;re out of luck, download the plugin.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomcornilliac.com/2008/02/fix-for-eclipse-33-crashing-under-osx-leopard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adobe&#8217;s Flex 3.0 and AIR 1.0 released!</title>
		<link>http://www.tomcornilliac.com/2008/02/adobes-flex-30-and-air-10-released/</link>
		<comments>http://www.tomcornilliac.com/2008/02/adobes-flex-30-and-air-10-released/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 05:45:42 +0000</pubDate>
		<dc:creator>Tom Cornilliac</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[SDK]]></category>

		<guid isPermaLink="false">http://www.cornilliac.com/blog/?p=52</guid>
		<description><![CDATA[The title says it all. Here&#8217;s some links to the bits. Flex Builder 3.0 http://www.adobe.com/products/flex/ Flex SDK 3.0 http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK AIR 1.0 http://www.adobe.com/products/air/]]></description>
			<content:encoded><![CDATA[<p>The title says it all. Here&#8217;s some links to the bits.</p>
<p>Flex Builder 3.0<br />
<a href="http://www.adobe.com/products/flex/">http://www.adobe.com/products/flex/</a></p>
<p>Flex SDK 3.0<br />
<a href="http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK">http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK</a><br />
AIR 1.0<br />
<a href="http://www.adobe.com/products/air/">http://www.adobe.com/products/air/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomcornilliac.com/2008/02/adobes-flex-30-and-air-10-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Flex Builder 3 Professional license should be cross-platform</title>
		<link>http://www.tomcornilliac.com/2008/02/the-flex-builder-3-professional-license-should-be-cross-platform/</link>
		<comments>http://www.tomcornilliac.com/2008/02/the-flex-builder-3-professional-license-should-be-cross-platform/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 18:17:26 +0000</pubDate>
		<dc:creator>Tom Cornilliac</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.cornilliac.com/blog/?p=51</guid>
		<description><![CDATA[Edit: In a comment below Ted Patrick confirmed that Adobe has indeed already changed the licensing to allow for a virtualized Win/Mac combination. Fantastic News! One more reason to develop on a Mac! (02/08/08 11:42 PST) I develop Flex and AIR applications in Flex Builder on my Macbook Pro notebook and I keep a copy [...]]]></description>
			<content:encoded><![CDATA[<p><em><br />
Edit: In a comment below Ted Patrick confirmed that Adobe has indeed already changed the licensing to allow for a virtualized Win/Mac combination. Fantastic News! One more reason to develop on a Mac! (02/08/08  11:42 PST)<br />
</em></p>
<p>I develop Flex and AIR applications in Flex Builder on my Macbook Pro notebook and I keep a copy of VMWare Fusion and Window XP on standby for testing.</p>
<p>Last week while debugging an AIR application I came across a NativeMenu problem that required me to set breakpoints inside the Windows specific section of the NativeMenu code. No problem, I fired up VMWare Fusion, started Windows XP, installed Flex Builder 3 beta 3 and imported the project from my Mac partition. It all worked very slick and I was able to debug the problem and code a solution from within Windows, all without making a copy of the code base.</p>
<p>It all sounds so good and efficient right?</p>
<p>But later as I was basking in the glory of my victory, I got to thinking&#8230;this won&#8217;t be possible once Flex Builder 3 is released because I won&#8217;t have a Windows license key for Flex Builder 3. Will I need to spend hundreds of dollars for a Windows license key just so I can debug the occasional AIR application? What about when Linux support is a reality? Hundreds more? </p>
<p>The short answer may be &#8220;Yes&#8221;, pony up the cash and move on ya whiner!</p>
<p>But there&#8217;s a larger question at the root of this issue. Does Adobe as the provider of a freely available cross-platform runtime have an obligation to it&#8217;s developers to provide an equivalent platform for developing and debugging across all the supported platforms? In my opinion they do, it&#8217;s in Adobe&#8217;s best interest long term. Being able to debug AIR applications on Windows, Mac and (looking forward) Linux will only improve the quality of AIR applications and that in-turn should promote adoption of the platorm.</p>
<p>Let me be clear, I&#8217;m not suggesting that Adobe give away the IDE farm, I am suggesting that Adobe needs to consider the developer faced with challenges of cross-platform debugging in AIR. How does the developer who cannot afford a Windows, Mac &#038; Linux IDE affect the platform as a whole? In my opinion the AIR applications we create (free or not) are public ambassadors for the platform, as such we need them to be stable and performant across every platform the AIR runtime supports. To accomplish this we need reasonable access to tools for each platorm.</p>
<p>So here&#8217;s my suggestion Adobe, it&#8217;s simple. Make the Flex Builder Professional license cross-platform. Let your developers make a choice for cross-platform debugging.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomcornilliac.com/2008/02/the-flex-builder-3-professional-license-should-be-cross-platform/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Artemis is dead, long live Merapi!</title>
		<link>http://www.tomcornilliac.com/2008/02/artemis-is-dead-long-live-merapi/</link>
		<comments>http://www.tomcornilliac.com/2008/02/artemis-is-dead-long-live-merapi/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 17:26:27 +0000</pubDate>
		<dc:creator>Tom Cornilliac</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Artemis]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Merapi]]></category>

		<guid isPermaLink="false">http://www.cornilliac.com/blog/?p=50</guid>
		<description><![CDATA[We knew it was coming but we didn&#8217;t know when or in what form. Adam Flater just posted that the Artemis project has officially been reborn as the Merapi project. The list of contributors looks impressive, including both developers and designers. For those of you not familiar with Artemis Merapi, it&#8217;s a framework for connecting [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://adamflater.blogspot.com/2008/02/meet-merapi.html' title='Merapi Logo'><img src='http://www.cornilliac.com/blog/wp-content/uploads/2008/02/merapilogo300.thumbnail.jpg' alt='Merapi Logo' align='right'/></a></p>
<p>We knew <a href="http://adamflater.blogspot.com/2008/01/future-of-artemis.html">it was coming</a> but we didn&#8217;t know when or in what form. <a href="http://adamflater.blogspot.com">Adam Flater</a> just posted that the Artemis project has officially been reborn as the <a href="http://adamflater.blogspot.com/2008/02/meet-merapi.html">Merapi project</a>. The list of contributors looks impressive, including both developers and designers.</p>
<p>For those of you not familiar with <del datetime="2008-02-05T16:59:19+00:00">Artemis</del> Merapi, it&#8217;s a framework for connecting Adobe AIR applications to the desktop using Java technology. Merapi picks-up where the AIR 1.0 runtime drops off, in that while AIR can read and write from the native file system it cannot launch native applications or interact with the shell. </p>
<p>Merapi has huge potential and I&#8217;m looking forward discovering what&#8217;s possible when we can combine the power of Java with the richness and ubiquity of Adobe AIR. These are exciting times indeed!</p>
<p>By the way&#8230;looks like the namesake might be <a href="http://en.wikipedia.org/wiki/Mount_Merapi">a mountain in Java Indonesia</a></p>
<p><em>Edit:<br />
Andrew Powell has also <a href="http://www.infoaccelerator.net/index.cfm?event=showEntry&#038;entryId=EA90DA24-FF30-C9A3-ADC312077D259100">posted a few words about Merapi</a> and a few more about why they chose the name. (02/05/08  09:37am PST)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomcornilliac.com/2008/02/artemis-is-dead-long-live-merapi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flex on a mobile is closer than we thought!</title>
		<link>http://www.tomcornilliac.com/2008/01/flex-on-a-mobile-is-closer-then-we-thought/</link>
		<comments>http://www.tomcornilliac.com/2008/01/flex-on-a-mobile-is-closer-then-we-thought/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 15:39:37 +0000</pubDate>
		<dc:creator>Tom Cornilliac</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.cornilliac.com/blog/?p=47</guid>
		<description><![CDATA[I was reviewing Engadget&#8217;s coverage of Demo 08 this morning and I nearly fell out of my seat when I saw skyfire. skyfire is a mobile browser that claims to bring a PC browsing experience to the mobile phone for the first time. From the skyfire site product page: We’re talking about full-featured PC versions [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.cornilliac.com/blog/wp-content/uploads/2008/01/meskyfire_logo.jpg' rel="lightbox[47]" title='skyfire logo'><img src='http://www.cornilliac.com/blog/wp-content/uploads/2008/01/meskyfire_logo.jpg' alt='skyfire logo' align="right" /></a></p>
<p>I was reviewing Engadget&#8217;s coverage of Demo 08 this morning and I nearly fell out of my seat when I saw <a href="http://www.skyfire.com">skyfire</a>. skyfire is a mobile browser that claims to bring a PC browsing experience to the mobile phone for the first time.</p>
<p><span id="more-47"></span></p>
<p>From the skyfire site product page:</p>
<blockquote><p>
We’re talking about full-featured PC versions of your favorite web sites. Skyfire gives you speedy page loads, full audio, video, images, dynamic Flash content, advanced Ajax, Java and more – just like your PC.
</p></blockquote>
<p>Of course you know where I&#8217;m going with this, if skyfire supports Flash 9 then skyfire also supports Flex. We could be on the verge of taking our Flex apps mobile. To me this news is beyond huge! Imagine the new opportunities that would be created by full Flash/Flex in the mobile space. </p>
<p>At the time of writing, skyfire is in private beta and is only available for Windows mobile 5 &#038; 6 and that only on phones with a full Qwerty keyboard. Their site says that Symbian support is coming soon. I use a Nokia E61i so I&#8217;ll have to wait for Symbian support.</p>
<p>You can sign-up for the private beta on the skyfire site.</p>
<p>Here&#8217;s a demo of skyfire in action, <strong>impressive</strong>!</p>
<div align="center">
<object width="425" height="373"><param name="movie" value="http://www.youtube.com/v/4mWUoxiLZFc&#038;rel=1&#038;border=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/4mWUoxiLZFc&#038;rel=1&#038;border=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="373"></embed></object>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.tomcornilliac.com/2008/01/flex-on-a-mobile-is-closer-then-we-thought/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Handling deferred view component creation within the PureMVC framework</title>
		<link>http://www.tomcornilliac.com/2008/01/handling-deferred-view-component-creation-within-the-puremvc-framework/</link>
		<comments>http://www.tomcornilliac.com/2008/01/handling-deferred-view-component-creation-within-the-puremvc-framework/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 19:24:15 +0000</pubDate>
		<dc:creator>Tom Cornilliac</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[PureMVC]]></category>

		<guid isPermaLink="false">http://www.cornilliac.com/blog/?p=44</guid>
		<description><![CDATA[For my last AIR project and my current Flex project I&#8217;ve been using the PureMVC ActionScript framework. It&#8217;s a solid framework and on the whole I&#8217;m enjoying working with it. When using PureMVC for Flex and AIR development one of the questions I see consistently is how to create mediators for deferred components. In other [...]]]></description>
			<content:encoded><![CDATA[<p> For my last AIR project and my current Flex project I&#8217;ve been using the <a href="http://www.puremvc.org">PureMVC</a> ActionScript framework. It&#8217;s a solid framework and on the whole I&#8217;m enjoying working with it. When using PureMVC for Flex and AIR development one of the questions I see consistently is how to create mediators for deferred components. In other words, if the view of your app uses a view stack how do you handle creating mediators on the children of the viewstack that are not created yet?  <span id="more-44"></span></p>
<p>PureMVC uses mediators for all communication from the model and controller to the view. Out of the box PureMVC normally creates the view mediators after creationComplete has fired and the model has been initialized. The reason for this is that mediators require a reference to a view component to work. In order to construct a mediator you first need an object or view component to pass to the constructor.</p>
<p>There are basically three different ways to handle this, two of which I don&#8217;t recommend using.</p>
<p><strong>1. <u>Use dummy objects to initialize mediators</u></strong><br />
<strong> </strong>If you know that your view component is not on the stage yet you could still create it&#8217;s mediator by passing a POASO (plain old actionscript object) to it&#8217;s constructor. I have two problems with this solution; One you&#8217;re unnecessarily using memory and two you have not treated the whole problem, you still need some type of event schema to reinitialize the mediator once the component has been created. <strong>I don&#8217;t recommend using this solution.</strong></p>
<p><strong>2. <u>Use creationPolicy=&#8221;all&#8221; to avoid deferred views</u><br />
</strong>By default components like ViewStack and TabNavigator on create their top level children at runtime. The remainder are created as the user navigates to them. You can use the creationPolicy=&#8221;all&#8221; attribute to override this behavior. This causes the application to create all the view components at runtime. <strong>This is a terrible idea and I cannot recommend it. </strong>What you are in effect saying to your user is &#8220;I don&#8217;t care about your memory or performance because I&#8217;m to lazy to code a decent solution&#8221; I know this is a bit dramatic but I hate when people use this attribute.</p>
<p><strong>3. <u>Use a custom Event subclass</u><br />
</strong>The idea here is to create an event subclass that the application mediator or another mediator can listen for and use to create new mediators. This event class has an extra property which holds a reference to the newly created component, other mediators can use this reference to construct a mediator for the component. This approach not only keeps your memory footprint smaller but it allows you to easily create and destroy mediators. <strong>Here&#8217;s an example of an Event subclass:</strong></p>
<p>You create your own constant names based on the event type you want your mediator to listen for.</p>
<p>[as]<br />
package com.tomcornilliac.myproject.events<br />
{<br />
	import flash.events.Event;</p>
<p>   	public class ComponentCreationEvent extends Event<br />
   	{<br />
      	// Publically accessible properties<br />
      	public var component:Object;</p>
<p>		//Constants used for routing withing PureMVC mediators<br />
		public static const SOME_EVENT:String = &#8220;gatewayCreated&#8221;;<br />
		public static const SOME_OTHER_EVENT:String = &#8220;gatewayStackCreated&#8221;;</p>
<p>		public function ComponentCreationEvent(type:String, component:Object, bubbles:Boolean=false, cancelable:Boolean=false)<br />
		{<br />
			super(type, bubbles, cancelable);<br />
			//Probably should have a getter/setter for this property<br />
			this.component = component;<br />
		}</p>
<p>		//You must override the clone method<br />
		override public function clone():Event<br />
		{<br />
			return new ComponentCreationEvent(type, component, bubbles, cancelable);<br />
		}<br />
	}<br />
}<br />
[/as]</p>
<p>An instance of this event is dispatched from your view component with a reference to its self. <em>Note that &#8220;bubbles&#8221; is set to true, this is required for the event to make it up the chain to whatever mediator is listening.</em><br />
[xml]<br />
<?xml version="1.0" encoding="utf-8"?></p>
<p><mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"<br />
	width="100%" height="100%" creationComplete="init(event)"></p>
<p>	<mx:Metadata><br />
		[Event(name="gatewayCreated", type="org.deschutes.grizzly.events.ComponentCreationEvent")]<br />
	</mx:Metadata></p>
<p>	<mx:Script><br />
		<![CDATA[<br />
			import com.tomcornilliac.myproject.events.ComponentCreationEvent;</p>
<p>			private function init(e:Event):void<br />
			{<br />
				dispatchEvent(new ComponentCreationEvent(ComponentCreationEvent.GATEWAY_CREATED, this, true));<br />
			}<br />
		]]&gt;<br />
	</mx:Script></p>
<p></mx:Canvas><br />
[/xml]</p>
<p>The listening mediator (in this case the ApplictionMediator) will respond to the event and create and register a new mediator for the newly created view component. Now it&#8217;s important to note that while I&#8217;m using the ApplicationMediator in this example, you can use any mediator you want, so long as the event will bubble-up to it.</p>
<p>[as]<br />
package com.tomcornilliac.myproject.view<br />
{<br />
	import com.tomcornilliac.myproject.events.ComponentCreationEvent;<br />
	import com.tomcornilliac.myproject.view.components.SomeComponent;<br />
	import org.puremvc.interfaces.IMediator;<br />
	import org.puremvc.interfaces.INotification;<br />
	import org.puremvc.patterns.mediator.Mediator;</p>
<p>	public class ApplicationMediator extends Mediator implements IMediator<br />
	{<br />
		//Canonical name of the mediator<br />
		public static const NAME:String = &#8216;ApplicationMediator&#8217;;</p>
<p>		//Constructor<br />
		public function ApplicationMediator(viewComponent:Object)<br />
		{<br />
			super(viewComponent);</p>
<p>			/**<br />
			 * Setup event listeners for components created dynamically<br />
			 */<br />
			 app.addEventListener(ComponentCreationEvent.SOME_EVENT, createNewMediator);<br />
		}</p>
<p>		private function createNewMediator(e:ComponentCreationEvent):void<br />
		{<br />
			//Create the new Mediator and initialize it with the component from our event<br />
			var mediator:SomeComponentMediator = new SomeComponentMediator(e.component);<br />
			//Register the mediator with the Application Facade<br />
			facade.registerMediator(mediator)<br />
			//That&#8217;s it now your view component is hooked-up and ready to handle I/O<br />
		}</p>
<p>		&#8230;.other methods<br />
[/as]</p>
<p>This technique is not only good for component creation but you could just as easily create a custom ComponentDestructionEvent and use it to remove Mediators off the stack when no longer needed. </p>
<p>If you would like more information about the PureMVC framework I encourage you to <a href="http://www.puremvc.org">visit the PureMVC web site</a>. The documentation is excellent and there&#8217;s even a training course to help you on your way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomcornilliac.com/2008/01/handling-deferred-view-component-creation-within-the-puremvc-framework/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
