<?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>Christophe Herreman &#187; tips &#8216;n tricks</title>
	<atom:link href="http://www.herrodius.com/blog/category/tips-n-tricks/feed" rel="self" type="application/rss+xml" />
	<link>http://www.herrodius.com/blog</link>
	<description>Thoughts from a software developer</description>
	<lastBuildDate>Thu, 10 Jun 2010 19:08:13 +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>Maven, Flex Mojos and Flash Builder 4 tip</title>
		<link>http://www.herrodius.com/blog/169</link>
		<comments>http://www.herrodius.com/blog/169#comments</comments>
		<pubDate>Fri, 26 Jun 2009 10:32:57 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[tips 'n tricks]]></category>

		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=169</guid>
		<description><![CDATA[Here's a quick tip for those of you who are using Flash Builder 4's FlexUnit integration and also build with Maven and Flex Mojos.
When executing the unit tests of your library project or application, Flash Builder creates a FlexUnitApplication.mxml file in the root package of your main class path. This file is the test runner [...]]]></description>
			<content:encoded><![CDATA[<p>Here's a quick tip for those of you who are using Flash Builder 4's FlexUnit integration and also build with <a href="http://maven.apache.org/">Maven</a> and <a href="http://code.google.com/p/flex-mojos/">Flex Mojos</a>.</p>
<p>When executing the unit tests of your library project or application, Flash Builder creates a FlexUnitApplication.mxml file in the root package of your main class path. This file is the test runner UI that gets compiled when the tests are run. The problem is that when you try to execute a Maven build on your project, the build will fail because the test runner UI will also get compiled.</p>
<p>A solution is to use the <a href="http://maven.apache.org/plugins/maven-clean-plugin/">maven-clean-plugin</a> in the build phase and configure it to delete the FlexUnitApplication.mxml file.</p>
<p>To use it, place the following xml in the "build/plugins" section of your Maven build file. You might need to change the "directory" setting to match your classpath.</p>
<div class="igBar"><span id="lxml-2"><a href="#" onclick="javascript:showPlainTxt('xml-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-2">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;plugin<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;artifactId<span style="font-weight: bold; color: black;">&gt;</span></span></span>maven-clean-plugin<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/artifactId<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;configuration<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;filesets<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;fileset<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;directory<span style="font-weight: bold; color: black;">&gt;</span></span></span>src/main/actionscript<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/directory<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;includes<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;include<span style="font-weight: bold; color: black;">&gt;</span></span></span>FlexUnitApplication.mxml<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/include<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/includes<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/fileset<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/filesets<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/configuration<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/plugin<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>If you now execute a "mvn clean install" command, the file will be removed and the build should succeed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.herrodius.com/blog/169/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flex Formatter Eclipse Plug-in</title>
		<link>http://www.herrodius.com/blog/165</link>
		<comments>http://www.herrodius.com/blog/165#comments</comments>
		<pubDate>Fri, 05 Jun 2009 15:11:38 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[tips 'n tricks]]></category>

		<guid isPermaLink="false">http://www.herrodius.com/blog/165</guid>
		<description><![CDATA[If you're using Eclipse and Flash/Flex Builder, you might want to have a look at the Flex Formatter Plug-in. It's a great add-on that allows you to (auto-)format your ActionScript and MXML files, based on the templates you define.
This is a key feature that is still missing in Flash/Flex Builder in my opinion.
More info: http://sourceforge.net/projects/flexformatter/
]]></description>
			<content:encoded><![CDATA[<p>If you're using Eclipse and Flash/Flex Builder, you might want to have a look at the Flex Formatter Plug-in. It's a great add-on that allows you to (auto-)format your ActionScript and MXML files, based on the templates you define.</p>
<p>This is a key feature that is still missing in Flash/Flex Builder in my opinion.</p>
<p>More info: <a href="http://sourceforge.net/projects/flexformatter/">http://sourceforge.net/projects/flexformatter/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.herrodius.com/blog/165/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Unable to access UserTransaction in DataService</title>
		<link>http://www.herrodius.com/blog/153</link>
		<comments>http://www.herrodius.com/blog/153#comments</comments>
		<pubDate>Mon, 25 Aug 2008 13:36:58 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[tips 'n tricks]]></category>

		<guid isPermaLink="false">http://www.herrodius.com/blog/153</guid>
		<description><![CDATA[Note: Just a short post to save your hair from turning gray (I know mine just did)
If you ever run into a "Unable to access UserTransaction in DataService" error when working with LCDS on Tomcat 5.5.x+, make sure you configured the Java Open Transaction Manager (JOTM) correctly. You can do this by adding the following [...]]]></description>
			<content:encoded><![CDATA[<p><em>Note: Just a short post to save your hair from turning gray (I know mine just did)</em></p>
<p>If you ever run into a "<strong>Unable to access UserTransaction in DataService</strong>" error when working with LCDS on Tomcat 5.5.x+, make sure you configured the Java Open Transaction Manager (JOTM) correctly. You can do this by adding the following in a project config file (META_INF/context.xml or a file named [MY_PROJECT].xml in [TOMCAT_HOME]/conf/Catalina/localhost):</p>
<div class="igBar"><span id="lxml-4"><a href="#" onclick="javascript:showPlainTxt('xml-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-4">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Context</span> <span style="color: #000066;">reloadable</span>=<span style="color: #ff0000;">"true"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Transaction</span> <span style="color: #000066;">factory</span>=<span style="color: #ff0000;">"org.objectweb.jotm.UserTransactionFactory"</span> jotm.<span style="color: #000066;">timeout</span>=<span style="color: #ff0000;">"60"</span><span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Context<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now if only the Flex Project Wizard would do this for us...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.herrodius.com/blog/153/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Flex 3 Localization</title>
		<link>http://www.herrodius.com/blog/123</link>
		<comments>http://www.herrodius.com/blog/123#comments</comments>
		<pubDate>Thu, 24 Jan 2008 20:16:14 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[tips 'n tricks]]></category>

		<guid isPermaLink="false">http://www.herrodius.com/blog/123</guid>
		<description><![CDATA[With Flex 3 comes the ability to do runtime localization. Compared to Flex 2 where you actually had to recompile your application for each locale, you can now have one version of your application that contains different resource bundles.
Today I implemented this in one of the applications we are working on and ran into some [...]]]></description>
			<content:encoded><![CDATA[<p>With Flex 3 comes the ability to do runtime localization. Compared to Flex 2 where you actually had to recompile your application for each locale, you can now have one version of your application that contains different resource bundles.</p>
<p>Today I implemented this in one of the applications we are working on and ran into some issues. Here is how I got it to work in a nutshell. (Note: for a full instruction on implementing localization in Flex 3, I recommend the article <a href="http://bugs.adobe.com/confluence/display/ADOBE/Flex+3+Details+-+Runtime+Localization">Flex 3 Details - Runtime Localization</a>)</p>
<p>- create a folder in your project to store your resource bundles (e.g. "locale")<br />
- create a subfolder for each locale you want to implement (e.g. "locale\nl_BE" and "locale\fr_BE")<br />
- in the locale subfolder, create a resources.properties file and save it as UTF-8<br />
- enter the resources in the form of "key=value", like Ant property files<br />
- update the compiler settings: -locale=nl_BE,fr_BE -source-path=locale/{locale}</p>
<p>You now also need to create localized framework resources. To do this, take the following steps:</p>
<p>- open a command line (run as administrator in Vista!)<br />
- go to the "bin" folder in your Flex SDK installation folder<br />
- run the copylocale.exe tool for each locale, this will copy the localized framework files from one locale to another (copylocale en_US nl_BE)<br />
- check FLEX_HOME\frameworks\locale to see if the folder for your new locale has been created<br />
- if you get an error "could not find resource bundle charts", search for a file called charts_rb.swc and copy it to the new locale folder in FLEX_HOME\frameworks\locale</p>
<p>A simple example of asking for a localized string:</p>
<div class="igBar"><span id="lactionscript-7"><a href="#" onclick="javascript:showPlainTxt('actionscript-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-7">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// tell the compiler what resourcebundle to use</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;mx:Metadata&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#91;</span>ResourceBundle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"resources"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/mx:Metadata&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// if you are in a subclass of UIComponent</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> myString:<span style="color: #0066CC;">String</span> = resourceManager.<span style="color: #006600;">getString</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"resources"</span>, <span style="color: #ff0000;">"myKey"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// ...or if you are not in a subclass of UIComponent</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> myString:<span style="color: #0066CC;">String</span> = ResourceManager.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getString</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"resources"</span>, <span style="color: #ff0000;">"myKey"</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>You can put these calls in a binding expression and switch your locale at runtime by setting the localeChain property on the resourceManager:</p>
<div class="igBar"><span id="lactionscript-8"><a href="#" onclick="javascript:showPlainTxt('actionscript-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-8">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">resourceManager.<span style="color: #006600;">localeChain</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">"nl_BE"</span><span style="color: #66cc66;">&#93;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>That's about it. Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.herrodius.com/blog/123/feed</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Cruise Control and SVN over HTTPS</title>
		<link>http://www.herrodius.com/blog/118</link>
		<comments>http://www.herrodius.com/blog/118#comments</comments>
		<pubDate>Tue, 15 Jan 2008 09:37:57 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[cruise control]]></category>
		<category><![CDATA[tips 'n tricks]]></category>

		<guid isPermaLink="false">http://www.herrodius.com/blog/118</guid>
		<description><![CDATA[When adding Prana to our Cruise Control system via the web dashboard, I ran into the following svn error:
svn: PROPFIND request failed on '/svnroot/prana/trunk'svn: PROPFIND of '/svnroot/prana/trunk': Server certificate verification failed: issuer is not trusted (https://prana.svn.sourceforge.net)
The problem is that a checkout over https requests the verification of a server certificate which is not handled in [...]]]></description>
			<content:encoded><![CDATA[<p>When adding Prana to our Cruise Control system via the web dashboard, I ran into the following svn error:</p>
<p><strong>svn: PROPFIND request failed on '/svnroot/prana/trunk'svn: PROPFIND of '/svnroot/prana/trunk': Server certificate verification failed: issuer is not trusted (https://prana.svn.sourceforge.net)</strong></p>
<p>The problem is that a checkout over https requests the verification of a server certificate which is not handled in the web dashboard interface.</p>
<p><strong>The solution</strong></p>
<p>Make sure you have a user where the cruise control service is running under. Then log in to the build server with that user and manually checkout the repository with the following command...</p>
<p><code>svn checkout https://prana.svn.sourceforge.net/svnroot/prana/trunk c:/progra~1/cruisecontrol/projects/prana</code></p>
<p>... then press 'p' to accept the certificate permanently. You can now go back to the web dashboard and create the project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.herrodius.com/blog/118/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
