<?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>Flex notes &#187; Uncategorized</title>
	<atom:link href="http://www.robertbak.com/wordpress/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.robertbak.com/wordpress</link>
	<description>My notes on Flex related topics</description>
	<lastBuildDate>Thu, 10 Nov 2011 10:49:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Snippet &#8211; Disabling paste on spark TexInput</title>
		<link>http://www.robertbak.com/wordpress/2011/03/snippet-disabling-paste-on-spark-texinput/</link>
		<comments>http://www.robertbak.com/wordpress/2011/03/snippet-disabling-paste-on-spark-texinput/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 01:23:31 +0000</pubDate>
		<dc:creator>Robert Bak</dc:creator>
				<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[copy and paste]]></category>
		<category><![CDATA[disable]]></category>
		<category><![CDATA[Snippet]]></category>
		<category><![CDATA[TextArea]]></category>
		<category><![CDATA[TextInput]]></category>
		<guid isPermaLink="false">http://www.robertbak.com/wordpress/?p=246</guid>
		<description><![CDATA[It&#8217;s a common requirement for e-mail or password inputs &#8211; the second input should not be copy pasted from the first one, to make sure it&#8217;s what the user wanted to put in. When using spark my Flex 3 method didn&#8217;t work, so just in case someone needs to do the same thing, here&#8217;s the [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>It&#8217;s a common requirement for e-mail or password inputs &#8211; the second input should not be copy pasted from the first one, to make sure it&#8217;s what the user wanted to put in. When using spark my Flex 3 method didn&#8217;t work, so just in case someone needs to do the same thing, here&#8217;s the code for spark components:</p>
<div class="codecolorer-container actionscript geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&lt;</span>s:TextInput<br />
&nbsp; &nbsp;change=<span style="color: #ff0000;">&quot;if (event.operation is PasteOperation) <br />
&nbsp; &nbsp;(event.target as SkinnableTextBase).text = '' &quot;</span><br />
<span style="color: #66cc66;">/&gt;</span></div></div>
<p>It will also work with a TextArea.</p>
<div class="shr-publisher-246"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.robertbak.com/wordpress/2011/03/snippet-disabling-paste-on-spark-texinput/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>From photoshop design to a Flex 4 skin</title>
		<link>http://www.robertbak.com/wordpress/2010/03/from-photoshop-design-to-a-flex-4-skin/</link>
		<comments>http://www.robertbak.com/wordpress/2010/03/from-photoshop-design-to-a-flex-4-skin/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 18:03:36 +0000</pubDate>
		<dc:creator>Robert Bak</dc:creator>
				<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[skins flex4]]></category>
		<guid isPermaLink="false">http://www.robertbak.com/wordpress/?p=133</guid>
		<description><![CDATA[When looking at some old project folders I&#8217;ve found one of the first skins I&#8217;ve created while starting with the Flex 4 skinning model, and I thought it might be an interesting case to look at, source code is included at the end of the post. It&#8217;s based on a really nice design done by [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>When looking at some old project folders I&#8217;ve found one of the first skins I&#8217;ve created while starting with the Flex 4 skinning model, and I thought it might be an interesting case to look at, source code is included at the end of the post. It&#8217;s based on a really nice design done by <a href="http://www.adrianpelletier.com/">Adrian Pelletier</a>. What we&#8217;ll try to do is create a button which looks more or less like one of his button designs:<br />
<a href="http://www.robertbak.com/wordpress/wp-content/uploads/2010/03/button-design.png"><img class="aligncenter size-full wp-image-129" title="button-design" src="http://www.robertbak.com/wordpress/wp-content/uploads/2010/03/button-design.png" alt="" width="524" height="94" /></a><br />
What makes it a good design is not only the way it looks but also the way the Photoshop file is created &#8211; it&#8217;s mostly based on shapes and layer effects which are easy to translate to Flex skin code.<br />
<a href="http://www.robertbak.com/wordpress/wp-content/uploads/2010/03/layers.png"><img class="aligncenter size-full wp-image-131" title="layers" src="http://www.robertbak.com/wordpress/wp-content/uploads/2010/03/layers.png" alt="" width="219" height="115" /></a></p>
<h3>Styling a Flex 4 Button</h3>
<p>The Flex 4 skinning model is different from the one used in Flex 3, to keep the introduction short, let&#8217;s just say it&#8217;s now much easier to create programmatic skins, and you can do it with newly introduced MXML tags. If you ever used Degrafa to skin your components it&#8217;s should be fairly familiar, if not please check the example code. The basic usage is straight forward &#8211; you need to create a <em>mxml</em> file and you can start putting the new tags to design the skin.</p>
<p>Let&#8217;s start with the shadow behind the button, as you can see on the picture above it has 3 parts &#8211; a gradient fill, a stroke and an inner shadow, and all of them thrown on a shape of a rounded rectangle. Let&#8217;s translate this to graphic tags. First of we need that rounded rectangle, so we define a Rectangle with the corner radius using the new tags:</p>
<div class="codecolorer-container actionscript geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&lt;</span>s:Rect radiusY=<span style="color: #ff0000;">&quot;24&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; radiusX=<span style="color: #ff0000;">&quot;24&quot;</span><span style="color: #66cc66;">/&gt;</span></div></div>
<p>That&#8217;s how easy it is to create shapes using the new syntax. Next we need to define a fill, which according to the Photoshop design is a linear gradient starting from color 0x0f2835 and ending with color 0&#215;153445. We also need an inner drop shadow on it, so let&#8217;s add it. We also need a stroke <strong>above</strong> all this, so we need to add another rectangle which will not have the drop shadow on it, and will define that gradient stroke, just like the design. A few minutes later we have:</p>
<div class="codecolorer-container actionscript geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&lt;</span>s:Rect radiusY=<span style="color: #ff0000;">&quot;24&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; radiusX=<span style="color: #ff0000;">&quot;24&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x=<span style="color: #ff0000;">&quot;0&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y=<span style="color: #ff0000;">&quot;0&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;{this.width}&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;{this.height}&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>s:filters<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>s:DropShadowFilter inner=<span style="color: #ff0000;">&quot;true&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; distance=<span style="color: #ff0000;">&quot;0&quot;</span> &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strength=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;/</span>s:filters<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>s:fill<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:LinearGradient rotation=<span style="color: #ff0000;">&quot;90&quot;</span><span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:GradientEntry <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0x0f2835&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:GradientEntry <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0x153445&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;/</span>mx:LinearGradient<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;/</span>s:fill<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;/</span>s:Rect<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>s:Rect radiusY=<span style="color: #ff0000;">&quot;24&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; radiusX=<span style="color: #ff0000;">&quot;24&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x=<span style="color: #ff0000;">&quot;0&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y=<span style="color: #ff0000;">&quot;0&quot;</span> &nbsp;alpha=<span style="color: #ff0000;">&quot;0.8&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;{this.width}&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;{this.height}&quot;</span> <span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>s:stroke<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:LinearGradientStroke rotation=<span style="color: #ff0000;">&quot;90&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;weight=<span style="color: #ff0000;">&quot;2&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pixelHinting=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:GradientEntry <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0x102a39&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:GradientEntry <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0x20516c&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;/</span>mx:LinearGradientStroke<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;/</span>s:stroke<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;/</span>s:Rect<span style="color: #66cc66;">&gt;</span></div></div>
<p>It&#8217;s not the shortest listing, but remember that I&#8217;m only copying the settings from the design. The final flash result looks like this:<br />
<a href="http://www.robertbak.com/wordpress/wp-content/uploads/2010/03/shadow.png"><img class="aligncenter size-full wp-image-148" title="shadow" src="http://www.robertbak.com/wordpress/wp-content/uploads/2010/03/shadow.png" alt="" width="184" height="76" /></a></p>
<p>It&#8217;s almost a easy to create the rest of the design, take a look a the working button with some Flex magic thrown in to get nice transitions between states (<a href="http://robertbak.com/flexsamples/buttonSkin/source/index.html">viewsource</a> enabled), and after the jump, I&#8217;ll quickly point to different parts of the design which are used in the <i>ButtonSkin.mxml</i></p>
<h3>Result</h3>
<p> <iframe class="aligncenter size-full" src="http://robertbak.com/flexsamples/buttonSkin/SampleSkinApplication.html" style="height: 201px; width: 301px;" frameborder="0">Please upgrade your browser</iframe></p>
<h3>What makes a skin &#8211; looking at ButtonSkin.mxml</h3>
<p>First of you should define a component for which the skin is designed.</p>
<div class="codecolorer-container actionscript geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;<span style="color: #66cc66;">&#91;</span>HostComponent<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;spark.components.Button&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span></div></div>
<p>Next you need to define all the states which are defined by the host component (you can check this info on <a href="http://help.adobe.com/en_US/Flex/4.0/langref/spark/components/Button.html#SkinStateSummary">livedocs</a>) which is done in this code:</p>
<div class="codecolorer-container actionscript geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>s:states<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:State <span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;up&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:State <span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;down&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:State <span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;over&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:State <span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;disabled&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;/</span>s:states<span style="color: #66cc66;">&gt;</span></div></div>
<p>After that&#8217;s done you also need to put the parts of the skin that the host components assumes your skin will have (this is called <i>skinning contract</i> and I&#8217;ll write a post about it when I have some time). In the case of Button we need to display a single string (the button label as stated in <a href="http://help.adobe.com/en_US/Flex/4.0/langref/spark/components/Button.html#SkinPartSummary">livedocs</a>) we&#8217;re going to use a <i>Label</i> for that and give it an id of <i>labelDisplay</i> according to the contract.</p>
<div class="codecolorer-container actionscript geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&lt;</span>s:Label <span style="color: #0066CC;">left</span>=<span style="color: #ff0000;">&quot;17&quot;</span> <span style="color: #0066CC;">right</span>=<span style="color: #ff0000;">&quot;17&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0xffffff&quot;</span> <br />
&nbsp; &nbsp; <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;{this.height}&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> id=<span style="color: #ff0000;">&quot;labelDisplay&quot;</span> <span style="color: #66cc66;">&gt;</span></div></div>
<p>Than we can start putting in the graphics, using the same tags we used while creating the shadow. The only additions is that the values of the gradients change depending on the state, thanks to the new state syntax in Flex 4 it&#8217;s much more readable &#8211; there&#8217;s a different color when the button is in an over state (<i>color.over</i>) and a different one when the button is in the down state (<i>color.down</i>)</p>
<div class="codecolorer-container actionscript geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&lt;</span>mx:GradientEntry id=<span style="color: #ff0000;">&quot;ge1&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0x387dda&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">color</span>.<span style="color: #006600;">over</span>=<span style="color: #ff0000;">&quot;0x3e81de&quot;</span> <span style="color: #0066CC;">color</span>.<span style="color: #0066CC;">down</span>=<span style="color: #ff0000;">&quot;0x88bafe&quot;</span> <span style="color: #66cc66;">/&gt;</span></div></div>
<p>To add the smooth color fades between states we also define a bunch of transitions which work on our gradient entries.</p>
<div class="codecolorer-container actionscript geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&lt;</span>s:Transition &nbsp; fromState=<span style="color: #ff0000;">&quot;up&quot;</span> toState=<span style="color: #ff0000;">&quot;over&quot;</span> autoReverse=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp;<span style="color: #66cc66;">&lt;</span>s:AnimateColor targets=<span style="color: #ff0000;">&quot;{[ge1, ge2, ge3, ge4]}&quot;</span> &nbsp;<span style="color: #0066CC;">duration</span>=<span style="color: #ff0000;">&quot;250&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp;<span style="color: #66cc66;">&lt;/</span>s:Transition<span style="color: #66cc66;">&gt;</span></div></div>
<p>Feel free to download the source code and play with it, hopefully it will be a good starting point.<br />
<a href="http://robertbak.com/flexsamples/buttonSkin/source/SampleSkin.zip"><br />
Download source code.</a></p>
<div class="shr-publisher-133"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.robertbak.com/wordpress/2010/03/from-photoshop-design-to-a-flex-4-skin/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>FlexPMD released</title>
		<link>http://www.robertbak.com/wordpress/2009/09/flexpmd-released/</link>
		<comments>http://www.robertbak.com/wordpress/2009/09/flexpmd-released/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 15:01:29 +0000</pubDate>
		<dc:creator>Robert Bak</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://www.robertbak.com/wordpress/?p=16</guid>
		<description><![CDATA[There&#8217;s a new project on Adobe Open Source called FlexPMD (if You&#8217;re wondering what PMD stands for the answer is simple &#8211; nothing). It&#8217;s a tool that scans Actionsript and MXML code and points out bad practices, unused variables, etc. Really helpfull if you&#8217;re trying to keep the code clean and get a habit of  [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>There&#8217;s a new project on Adobe Open Source called <a href="http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD" >FlexPMD</a> (if You&#8217;re wondering what PMD stands for the answer is simple &#8211; <a href="http://pmd.sourceforge.net/meaning.html" >nothing</a>). It&#8217;s a tool that scans Actionsript and MXML code and points out bad practices, unused variables, etc. Really helpfull if you&#8217;re trying to keep the code clean and get a habit of  coding really nicely.</p>
<p>To try it out you really just need to go to the <a href="http://opensource.adobe.com/wiki/display/flexpmd/Downloads">download page</a>, get one of the versions (I&#8217;ve tested the command line one on windows and it works very good), generete a ruleset file using the web tool (link on the same page), and that analize the output XML file (you can use the simple web tool which is also provided on the download page).</p>
<p>I&#8217;ve put both the jar files and the ruleset (called <em>pmd.xml</em>) in &#8220;F:/Flex SDK/Tools/FlexPMD/&#8221; so the command to run it for me looks like this:</p>
<blockquote><p>java -Xmx256m -jar &#8220;F:/Flex SDK/Tools/FlexPMD/flex-pmd-command-line-1.0.RC3.jar&#8221; -s &#8220;F:/THE/DIRECTORY/WHICH/TO/ANALIZE/&#8221; -o . -r &#8220;F:/Flex SDK/Tools/FlexPMD/pmd.xml&#8221;</p></blockquote>
<p>It might be good to point out that you don&#8217;t need to analize the whole project but can also run the tool on any directory in it, which generates files which are easier to read, especially if you&#8217;re just starting to clean a big application.</p>
<div class="shr-publisher-16"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.robertbak.com/wordpress/2009/09/flexpmd-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

