<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Yoann on flex</title>
	<atom:link href="http://flexme.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://flexme.wordpress.com</link>
	<description>Discovering flex</description>
	<lastBuildDate>Wed, 11 Jul 2007 15:18:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='flexme.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Yoann on flex</title>
		<link>http://flexme.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://flexme.wordpress.com/osd.xml" title="Yoann on flex" />
	<atom:link rel='hub' href='http://flexme.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Internationalization in Flex</title>
		<link>http://flexme.wordpress.com/2007/07/11/internationalization-in-flex/</link>
		<comments>http://flexme.wordpress.com/2007/07/11/internationalization-in-flex/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 15:18:45 +0000</pubDate>
		<dc:creator>yoyoann</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[i18]]></category>
		<category><![CDATA[internationalization]]></category>

		<guid isPermaLink="false">http://flexme.wordpress.com/2007/07/11/internationalization-in-flex/</guid>
		<description><![CDATA[The flex site I am working on need internationalization. So of course I googled a bit and found some informations on how to use i18n in Flex. And the only really good answer I found was doing different builds using resources. However I need i18n at runtime, it is something the client needs, and I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexme.wordpress.com&amp;blog=1328167&amp;post=7&amp;subd=flexme&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The flex site I am working on need internationalization. So of course I googled a bit and found some informations on how to use i18n in Flex. And the only really good answer I found was doing different builds using resources.</p>
<p>However I need i18n at runtime, it is something the client needs, and I don&#8217;t want the user to reload the whole flex app when he wishes to change language.</p>
<p>I googled a bit more and found a blog post that explained how to get this to work &#8230; But could understand anything :</p>
<p>http://jeff.mxdj.com/internationalizing_flex_2_apps_pt_2.htm</p>
<p>So I am doing here a doable tutorial :</p>
<ol>
<li>create a Flex project.</li>
<li>create a <em>locale </em>directory at the flex root</li>
<li>add -<em>sp locale</em> to your flex compile options (right click, properties, flex compiler with eclipse) to add it to classpath</li>
<li>create a <em>fra.properties</em> and an <em>eng.properties </em>file in the <em>locale </em>directory</li>
<li>in the fra.properties, add the line : hello=salut</li>
<li>in the eng.properties, add the line : hello=hi</li>
<li>now let&#8217;s get to the code</li>
</ol>
<p>We create a singleton that will take care of all this.<br />
<code><br />
package<br />
{<br />
</code></p>
<blockquote><p><code> 	import mx.resources.ResourceBundle;</code><br />
<code> 	import flash.events.Event;</code>	public class Localizator<br />
{</p>
<blockquote><p> 		public static const FRENCH:int = 1;<br />
public static const ENGLISH:int = 2;		protected static var myLocalizator:Localizator;</p>
<p>[Bindable]<br />
private var cur:ResourceBundle;</p>
<p>[ResourceBundle("eng")]<br />
private var rb_eng:ResourceBundle;<br />
[ResourceBundle("fra")]<br />
private var rb_fra:ResourceBundle;</p>
<p>private var _lang:int;</p>
<p>public function Localizator (language:int=ENGLISH){</p>
<blockquote><p> 			selectLang( language );</p></blockquote>
<p>}</p>
<p>private function selectLang( language:int ) : void{</p>
<blockquote><p> 			this._lang = language;<br />
switch ( language ) {<br />
case ENGLISH :</p>
<blockquote><p> 					this.cur = rb_eng;<br />
break;</p></blockquote>
<p>case FRENCH :</p>
<blockquote><p> 					this.cur = rb_fra;<br />
break;</p></blockquote>
<p>default :</p>
<blockquote><p> 					this._lang = Localizator.ENGLISH;<br />
this.cur = rb_eng;<br />
break;</p></blockquote>
<p>}</p></blockquote>
</blockquote>
</blockquote>
<blockquote>
<blockquote><p> 		}</p></blockquote>
</blockquote>
<blockquote>
<blockquote><p>		public static function getInstance (language:int) : Localizator {</p>
<blockquote><p> 			if( Localizator.myLocalizator == null ){</p>
<blockquote><p> 				Localizator.myLocalizator = new Localizator(language);</p></blockquote>
<p>}<br />
return Localizator.myLocalizator;</p></blockquote>
<p>}</p></blockquote>
<blockquote><p>		[Bindable(event="langChange")]<br />
public function  getText( key:String ) : String {</p>
<blockquote><p> 			return this.cur.getString( key );</p></blockquote>
<p>}</p></blockquote>
<blockquote><p>		/**<br />
* Shortcut for getText<br />
*/<br />
[Bindable(event="langChange")]<br />
public function  gT( key:String ) : String {</p>
<blockquote><p> 			return this.getText(key);</p></blockquote>
<p>}</p></blockquote>
<blockquote><p>		public function get lang () : int {</p>
<blockquote><p> 			return this._lang;</p></blockquote>
<p>}</p></blockquote>
<blockquote><p>		public function set lang ( language:int ) : void {</p>
<blockquote><p> 			if( this._lang != language ){</p>
<blockquote><p> 				this.selectLang( language );<br />
var e:Event = new Event(&#8220;langChange&#8221;);<br />
this.dispatchEvent(e);</p></blockquote>
<p>}</p></blockquote>
<p>}</p></blockquote>
<p>}</p></blockquote>
<p>}</p>
<p>You can now create a file, and for example add a lable with text=&#8221;{Localizatior.getInstance().gT(&#8216;hello&#8217;)}&#8221; and a button that will change the language of the localizator.</p>
<p>This example is pretty dirty but adapt it to match your needs and you should have an easy way to have an international app.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexme.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexme.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexme.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexme.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexme.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexme.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexme.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexme.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexme.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexme.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexme.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexme.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexme.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexme.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexme.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexme.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexme.wordpress.com&amp;blog=1328167&amp;post=7&amp;subd=flexme&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexme.wordpress.com/2007/07/11/internationalization-in-flex/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e3df4fba5a3f52e1c3eef202c4092ebb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yoyoann</media:title>
		</media:content>
	</item>
		<item>
		<title>Code behind, or not code behind ?</title>
		<link>http://flexme.wordpress.com/2007/07/06/code-behind-or-not-code-behind/</link>
		<comments>http://flexme.wordpress.com/2007/07/06/code-behind-or-not-code-behind/#comments</comments>
		<pubDate>Fri, 06 Jul 2007 08:16:45 +0000</pubDate>
		<dc:creator>yoyoann</dc:creator>
				<category><![CDATA[Code behind]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://flexme.wordpress.com/2007/07/06/code-behind-or-not-code-behind/</guid>
		<description><![CDATA[I was just reading a bunch of blogposts and I saw one about code behind which hooked me. Code behind is a pattern consisting in separating the view and the logic. There is an official way to implement it in Flex, as advocated by Adobe : Using Code Behind. A bunch of time ago, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexme.wordpress.com&amp;blog=1328167&amp;post=4&amp;subd=flexme&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was just reading a bunch of blogposts and I saw one about code behind which hooked me.</p>
<p>Code behind is a pattern consisting in separating the view and the logic. There is an official way to implement it in Flex, as advocated by Adobe :<a href="http://www.adobe.com/devnet/flex/quickstart/building_components_using_code_behind/"> Using Code Behind</a>.</p>
<p>A bunch of time ago, I created my own component using this pattern and really couldn&#8217;t see any use to this,  but I kept the thing in mind thinking it could become useful sometimes. When I saw this article today, I thought &#8220;oh maybe I will be able to get the point in using this&#8221;, and I started reading&#8230; I learnt really few things in the post, but one comment had a link to a<a href="http://www.tink.ws/blog/code-behind-and-flex-20-partial-classes/">Tink BlogPost</a> where he advocated that Flex&#8217; way of doing code behind is bad. I must admit I agree with some of his statements, most in fact, but I don&#8217;t love his method any much than the classic one using inheritance : it looks like the very classical include everybody has been using with javascript, and which clearly wasn&#8217;t very really easy to maintain.</p>
<p>So I think I will go on using nothing like partial classes and code behind, and the script tag along with data binding should be fine for me.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexme.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexme.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexme.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexme.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexme.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexme.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexme.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexme.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexme.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexme.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexme.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexme.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexme.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexme.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexme.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexme.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexme.wordpress.com&amp;blog=1328167&amp;post=4&amp;subd=flexme&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexme.wordpress.com/2007/07/06/code-behind-or-not-code-behind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e3df4fba5a3f52e1c3eef202c4092ebb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yoyoann</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex treeNavigator</title>
		<link>http://flexme.wordpress.com/2007/07/05/flex-treenavigator/</link>
		<comments>http://flexme.wordpress.com/2007/07/05/flex-treenavigator/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 14:48:32 +0000</pubDate>
		<dc:creator>yoyoann</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[TreeNavigator]]></category>

		<guid isPermaLink="false">http://flexme.wordpress.com/2007/07/05/flex-treenavigator/</guid>
		<description><![CDATA[I am currently building a website with a pretty complex navigation structure, and I stumbled on one of the Flex limitations : the absence of a tree component to browse on a viewstack. So I started writing something, thinking it would be plainly easy. However I quickly understood it would be way more difficult than [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexme.wordpress.com&amp;blog=1328167&amp;post=3&amp;subd=flexme&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am currently building a website with a pretty complex navigation structure, and I stumbled on one of the Flex limitations : the absence of a tree component to browse on a viewstack.  So I started writing something, thinking it would be plainly easy. However I quickly understood it would be way more difficult than I first thought, especially because my experience in dealing with dataBinding, e4x, and treeNavigation was almost null &#8230;</p>
<p>So I spent a good while trying to get an almost working version, that was really really ugly. I decided to rewrite all ..</p>
<p>I spent another while coding the whole stuff again, with genericity and resusability in mind, and I admit I am pretty proud of the result. It is still dirty and should be revamped a lot, and many things are not working yet, but it is already almost usable.</p>
<p><a href="//d.plenet.free.fr/YoannOnFlex/treeNavigator/TreeNavDemo.html">Demo </a> &#8211; <a href="http://d.plenet.free.fr/YoannOnFlex/treeNavigator/srcview/index.html">View Source</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexme.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexme.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexme.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexme.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexme.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexme.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexme.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexme.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexme.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexme.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexme.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexme.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexme.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexme.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexme.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexme.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexme.wordpress.com&amp;blog=1328167&amp;post=3&amp;subd=flexme&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexme.wordpress.com/2007/07/05/flex-treenavigator/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e3df4fba5a3f52e1c3eef202c4092ebb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yoyoann</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello world!</title>
		<link>http://flexme.wordpress.com/2007/07/05/hello-world/</link>
		<comments>http://flexme.wordpress.com/2007/07/05/hello-world/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 13:27:15 +0000</pubDate>
		<dc:creator>yoyoann</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hello on my Flex blog. This blog doesn&#8217;t aim to let you know all about Flex, but I will explain what are the difficulties I encounter when trying to master Flex ! You will see I still need a long work to get a good flex level, but I am trying hard !<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexme.wordpress.com&amp;blog=1328167&amp;post=1&amp;subd=flexme&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hello on my Flex blog.</p>
<p>This blog doesn&#8217;t aim to let you know all about Flex, but I will explain what are the difficulties I encounter when trying to master Flex !</p>
<p>You will see I still need a long work to get a good flex level, but I am trying hard !</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexme.wordpress.com/1/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexme.wordpress.com/1/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexme.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexme.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexme.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexme.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexme.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexme.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexme.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexme.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexme.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexme.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexme.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexme.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexme.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexme.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexme.wordpress.com&amp;blog=1328167&amp;post=1&amp;subd=flexme&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexme.wordpress.com/2007/07/05/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e3df4fba5a3f52e1c3eef202c4092ebb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">yoyoann</media:title>
		</media:content>
	</item>
	</channel>
</rss>
