<?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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Building Blocks &#187; components</title>
	<atom:link href="http://joelhooks.com/category/components/feed/" rel="self" type="application/rss+xml" />
	<link>http://joelhooks.com</link>
	<description>[without unit tests] you&#039;re not refactoring; you&#039;re just changing shit. -Hamlet D&#039;Arcy</description>
	<lastBuildDate>Fri, 30 Dec 2011 04:11:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
		<item>
		<title>Continuous Scrolling Thumbnail Component for Flex</title>
		<link>http://joelhooks.com/2009/12/24/continuous-scrolling-thumbnail-component-for-flex/</link>
		<comments>http://joelhooks.com/2009/12/24/continuous-scrolling-thumbnail-component-for-flex/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 04:37:27 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[components]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://joelhooks.com/?p=378</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
This post continues to be the most popular on this space after a year and a half. I've never been particularly fond of the implmenetation. Tightly coupled to very specific data sets and not really anything like a Flex component. It is setup more like an application (because it was pulled out of an application [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
<p><a href="http://joelhooks.com/2008/05/11/continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/">This post</a> continues to be the most popular on this space after a year and a half. I've never been particularly fond of the implmenetation. Tightly coupled to very specific data sets and not really anything like a Flex component. It is setup more like an application (because it was pulled out of an application and generalized).</p>
<p>I've finally found the opportunity to rewrite the continuous scrolling thumbnail view portion of the slideshow and I am much happier with the results. Now, instead of resembling an application it is structured like a standard Flex 3 List based component. You supply it with a dataProvider and an itemRenderer (IListItemRenderer) and it acts as you would expect it to.</p>
<p>This approach is much nicer, as the data is cleanly decoupled from the component implementation and it opens up the doors for reuse.</p>
<p><a href="http://github.com/joelhooks/components-thumbScroller">The code is available on Github</a>. If you have any suggestions or would like to add to the component, fork it and let me know!</p>
<div align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_SimpleSlideshow_364526633"
			class="flashmovie"
			width="450"
			height="600">
	<param name="movie" value="http://joelhooks.com/examples/thumbScroller/SimpleSlideshow.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://joelhooks.com/examples/thumbScroller/SimpleSlideshow.swf"
			name="fm_SimpleSlideshow_364526633"
			width="450"
			height="600">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object></div>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2009/12/24/continuous-scrolling-thumbnail-component-for-flex/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Mockups with Balsamiq</title>
		<link>http://joelhooks.com/2009/04/18/mockups-with-balsamiq/</link>
		<comments>http://joelhooks.com/2009/04/18/mockups-with-balsamiq/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 02:48:04 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[components]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ui/ux]]></category>

		<guid isPermaLink="false">http://joelhooks.com/?p=166</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
We need mockups. They allow us to communicate with developers, clients, users and everybody in between in a common language. I'm a big fan of the Sharpie and a pad of paper. Balsamiq Mockups has created a really great piece of software to speed up the mockup process. I'm also a big fan of mind [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
<p>We need mockups. They allow us to communicate with developers, clients, users and everybody in between in a common language. I'm a big fan of the Sharpie and a pad of paper. <a href="http://www.balsamiq.com/products/mockups">Balsamiq Mockups</a> has created a really great piece of software to speed up the mockup process.</p>
<p><img class="aligncenter size-full wp-image-168" title="balsamiq_desktop" src="http://69.164.207.135/wp-content/uploads/2009/04/balsamiq_desktop.png" alt="" width="475" height="412" /><br />
<span id="more-166"></span><br />
I'm also a big fan of mind maps. Using Balsamiq feels a lot like mind mapping, but with UI structures. It opens the door for new workflows. For me a new project will now consist of the mind map -&gt; Balsamiq generated mockups -&gt; refined wireframes -&gt; implementation.</p>
<p>Balsamiq allows you to save your mockups, both in an application specific XML format (BMML) and as png images. The png files are great for printing scratch sheets from templates that you have mocked up. These are extremely useful for meetings and annotation with the trusty pen.</p>
<p>One thing I really hope they consider for future versions is some sort of API for extending the available widgets. it would be great to build on the <a href="http://www.mockupstogo.net/">mockupstogo community</a> with lower-level user generated components. The ability to share fully mocked components is awesome, but I always want more control.</p>
<p>(edit) I thought that I would add that after playing a bit more I found that you can import your own 'widgets' using the Image object. It also lets you sketch an image on the fly, effectively allowing unlimited custom objects. Sweet.</p>
<p><img class="aligncenter size-full wp-image-167" title="balsamiq_iphone" src="http://69.164.207.135/wp-content/uploads/2009/04/balsamiq_iphone.png" alt="" width="475" height="284" /></p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2009/04/18/mockups-with-balsamiq/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Pleat Menu &#8211; Flex Component (draft)</title>
		<link>http://joelhooks.com/2009/04/18/pleat-menu-flex-component-draft/</link>
		<comments>http://joelhooks.com/2009/04/18/pleat-menu-flex-component-draft/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 23:14:20 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[components]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://joelhooks.com/?p=158</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
The Pleat menu that is used in Buzzword is really sweet. I wanted to emulate in an attempt to get a reusable component along the same lines. This is the first draft at my attempt, and it admittedly needs some work, but it is still useful, even in its current state. Here's the source. ]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
<p>The Pleat menu that is used in Buzzword is really sweet. I wanted to emulate in an attempt to get a reusable component along the same lines. This is the first draft at my attempt, and it admittedly needs some work, but it is still useful, even in its current state.</p>
<p><a href="http://joelhooks.com/examples/pleatMenu/srcview/">Here's the source.</a></p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_PleatMenuExample_1041719522"
			class="flashmovie"
			width="500"
			height="75">
	<param name="movie" value="/examples/pleatMenu/PleatMenuExample.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/examples/pleatMenu/PleatMenuExample.swf"
			name="fm_PleatMenuExample_1041719522"
			width="500"
			height="75">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>One of my goals with this is to have all the actual controls in the Pleat available at the top level. This makes it a lot easier to capture in PureMVC (or your event/notification system of choice) and doesn't bury the components. I want to go in and refactor it some more to emulate the Adobe set of Flex components. We'll see if I have the time <img src='http://joelhooks.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>the icons are from the awesome fugue set found <a href="http://www.pinvoke.com/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2009/04/18/pleat-menu-flex-component-draft/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Form Validation for the Lazy Programmer in Flex</title>
		<link>http://joelhooks.com/2009/02/01/form-validation-for-the-lazy-programmer-in-flex/</link>
		<comments>http://joelhooks.com/2009/02/01/form-validation-for-the-lazy-programmer-in-flex/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 05:54:57 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[components]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://joelhooks.com/?p=139</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
Forms... Any data-centric application is going to have its fair share of them. They are fairly tedious work. Layout out the form, manage the output, validate the output, over and over. Validation is best when it is active, to let the user know that they have made a mistake before they try to submit the [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
<p>Forms... Any data-centric application is going to have its fair share of them. They are fairly tedious work. Layout out the form, manage the output, validate the output, over and over. Validation is best when it is active, to let the user know that they have made a mistake before they try to submit the data. Optimally the user won't be allowed to continue until the form data is complete and accurate.</p>
<p>Every form I've written carries the same structure for validation, so as a dedicated lazy programmer I wrote a simple FormValidator class to handle the boilerplate.</p>

<div class="wp_codebox"><table><tr id="p1395"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
</pre></td><td class="code" id="p139code5"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">visualempathy</span>.<span style="color: #006600;">validators</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">DisplayObject</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">EventDispatcher</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">IEventDispatcher</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">events</span>.<span style="color: #006600;">ValidationResultEvent</span>;
	<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">validators</span>.<span style="color: #006600;">Validator</span>;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FormValidator <span style="color: #0066CC;">extends</span> EventDispatcher
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> formIsValid:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> validators:<span style="color: #0066CC;">Array</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> focusedFormControl:DisplayObject;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> FormValidator<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">target</span>:IEventDispatcher=<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">target</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> validateForm<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			focusedFormControl = event.<span style="color: #0066CC;">target</span> as DisplayObject;
			formIsValid = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
			<span style="color: #b1b100;">for</span> <span style="color: #b1b100;">each</span><span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> validator:Validator <span style="color: #b1b100;">in</span> validators <span style="color: #66cc66;">&#41;</span>
				validate<span style="color: #66cc66;">&#40;</span>validator<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> validate<span style="color: #66cc66;">&#40;</span>validator:Validator<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> validatorSource:DisplayObject = validator.<span style="color: #006600;">source</span> as DisplayObject;
			<span style="color: #000000; font-weight: bold;">var</span> supressEvents:<span style="color: #0066CC;">Boolean</span> = validatorSource <span style="color: #66cc66;">!</span>= focusedFormControl;
			<span style="color: #000000; font-weight: bold;">var</span> event:ValidationResultEvent = validator.<span style="color: #006600;">validate</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">null</span>, supressEvents<span style="color: #66cc66;">&#41;</span>
			<span style="color: #000000; font-weight: bold;">var</span> currentControlIsValid:<span style="color: #0066CC;">Boolean</span> = event.<span style="color: #0066CC;">type</span> == ValidationResultEvent.<span style="color: #006600;">VALID</span>;
&nbsp;
			formIsValid = formIsValid <span style="color: #66cc66;">&amp;&amp;</span> currentControlIsValid;
			<span style="color: #b1b100;">return</span> currentControlIsValid;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>in the MXML I add an Array structure to hold the Validators, and add the FormValidator like so:</p>

<div class="wp_codebox"><table><tr id="p1396"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code" id="p139code6"><pre class="xml" style="font-family:monospace;">	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Array</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;validators&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:StringValidator</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;studioNameValidator&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;{this.studioNameInput}&quot;</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">required</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:EmailValidator</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;emailValidator&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;{this.emailInput}&quot;</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">required</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:PhoneNumberValidator</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;phoneValidator&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;{this.phoneInput}&quot;</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">required</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:StringValidator</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;addValidator&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;{this.addressInput}&quot;</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">required</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:StringValidator</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;cityValidator&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;{this.cityInput}&quot;</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">required</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:StringValidator</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;stateValidator&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;{this.stateInput}&quot;</span> <span style="color: #000066;">minLength</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">maxLength</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">required</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:ZipCodeValidator</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;zipcodeValidator&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;{this.zipcodeInput}&quot;</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">required</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Array<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;validators:FormValidator</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;formValidator&quot;</span> <span style="color: #000066;">validators</span>=<span style="color: #ff0000;">&quot;{this.validators}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></td></tr></table></div>

<p>This allows you to add an arbitrary number of validators. Then in the various inputs:</p>

<div class="wp_codebox"><table><tr id="p1397"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p139code7"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:TextInput</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;studioNameInput&quot;</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;{this.studio.name}&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #000066;">change</span>=<span style="color: #ff0000;">&quot;this.formValidator.validateForm(event);&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></td></tr></table></div>

<p>with the button to commit the changes enabled only when the form is valid:</p>

<div class="wp_codebox"><table><tr id="p1398"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p139code8"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Button</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;saveChangesBtn&quot;</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;save&quot;</span> <span style="color: #000066;">click</span>=<span style="color: #ff0000;">&quot;handleSaveChanges()&quot;</span> <span style="color: #000066;">enabled</span>=<span style="color: #ff0000;">&quot;{this.formValidator.formIsValid}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></td></tr></table></div>

<p>It reduces some of the pain and tedium with the process of creating forms, which is always welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2009/02/01/form-validation-for-the-lazy-programmer-in-flex/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Adding a ToolTip function to a ComboBox in Flex</title>
		<link>http://joelhooks.com/2009/01/24/adding-a-tooltip-function-to-a-combobox-in-flex/</link>
		<comments>http://joelhooks.com/2009/01/24/adding-a-tooltip-function-to-a-combobox-in-flex/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 18:04:53 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://joelhooks.com/?p=132</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
My screens get a bit crowded sometimes, especially when dealing with forms. Users want to be able to see additional information, but there is just no place to put it. The data is dynamic though, so the toolTip needs to change based on the currently selectedItem of the ComboBox. With a DataGrid, for example, you [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
<p>My screens get a bit crowded sometimes, especially when dealing with forms. Users want to be able to see additional information, but there is just no place to put it. The data is dynamic though, so the toolTip needs to change based on the currently selectedItem of the ComboBox. With a DataGrid, for example, you have a showDataTip property on a column and can assign a dataTipFunction. There is no similar function in the ComboBox, but it is easy enough to add. I'm also using the HtmlToolTip class for a little extra style in the ToolTip itself.</p>
<p style="text-align: center;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_TooltipComboBox_210057313"
			class="flashmovie"
			width="400"
			height="135">
	<param name="movie" value="/examples/tooltipCombo/TooltipComboBox.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/examples/tooltipCombo/TooltipComboBox.swf"
			name="fm_TooltipComboBox_210057313"
			width="400"
			height="135">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><a href="/examples/tooltipCombo/srcview">View Source</a> is enabled.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2009/01/24/adding-a-tooltip-function-to-a-combobox-in-flex/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>ImageSwap (crossfade) Flex Component</title>
		<link>http://joelhooks.com/2008/12/06/imageswap-crossfade-flex-component/</link>
		<comments>http://joelhooks.com/2008/12/06/imageswap-crossfade-flex-component/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 05:52:06 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[components]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://joelhooks.com/?p=118</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
I needed a component that would work in my slideshow component and give a decent crossfade while letting the user know that something was going on. I used TweenLite for the tweening, and it works pretty well. It dispatches an 'imageLoaded' event when the image swap has completed. I needed this so that the slideshow [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
<p>I needed a component that would work in my <a href="http://joelhooks.com/2008/05/11/continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/">slideshow component</a> and give a decent crossfade while letting the user know that something was going on. I used TweenLite for the tweening, and it works pretty well. It dispatches an 'imageLoaded' event when the image swap has completed. I needed this so that the slideshow timer can resume. It pauses when the image starts loading because of various image sizes/connection speeds. Pretty simple, but it is a lot nicer than the harsh transition (or lack of) in the current slideshow.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_TestFadeComponent_401621997"
			class="flashmovie"
			width="490"
			height="500">
	<param name="movie" value="/examples/imageSwap/TestFadeComponent.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/examples/imageSwap/TestFadeComponent.swf"
			name="fm_TestFadeComponent_401621997"
			width="490"
			height="500">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><a href="/examples/imageSwap/srcview/">Source Here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/12/06/imageswap-crossfade-flex-component/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Flex Date and Time (datetime) Picker Control</title>
		<link>http://joelhooks.com/2008/10/11/flex-date-and-time-datetime-picker-control/</link>
		<comments>http://joelhooks.com/2008/10/11/flex-date-and-time-datetime-picker-control/#comments</comments>
		<pubDate>Sun, 12 Oct 2008 02:10:14 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://joelhooks.com/?p=94</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
I saw one of these at some point, but couldn't find it when I needed it again. Pretty simple, the control has a property called selectedDate that returns a date object represented by the selected date and time. You can also feed it a Date and it will adjust to that. It is on a [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
<p>I saw one of these at some point, but couldn't find it when I needed it again. Pretty simple, the control has a property called selectedDate that returns a date object represented by the selected date and time. You can also feed it a Date and it will adjust to that. It is on a 12 hour clock. It dispatches a change event (Event.CHANGE) as a new date/time is selected.</p>
<p>There is an Inspectable property called minuteIncrement to adjust the increment on the minute stepper. I couldn't figure out how to have double digits on the 0-9 minutes. If anybody knows how I might achieve that, please let me know.</p>
<p><a href="/examples/datetime/srcview">Here's the Source</a></p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_TestDateTime_1192295424"
			class="flashmovie"
			width="500"
			height="300">
	<param name="movie" value="/examples/datetime/TestDateTime.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/examples/datetime/TestDateTime.swf"
			name="fm_TestDateTime_1192295424"
			width="500"
			height="300">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/10/11/flex-date-and-time-datetime-picker-control/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Fabrication &#8211; Simplified PureMVC multicore modules (and more)</title>
		<link>http://joelhooks.com/2008/09/16/fabrication-simplified-puremvc-multicore-modules-and-more/</link>
		<comments>http://joelhooks.com/2008/09/16/fabrication-simplified-puremvc-multicore-modules-and-more/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 15:33:04 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[components]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[object oriented concepts]]></category>
		<category><![CDATA[puremvc]]></category>

		<guid isPermaLink="false">http://joelhooks.com/?p=85</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
One of the many reasons I love PureMVC is the community of highly intelligent, skilled, object-oriented (oriented) programmers that are constantly using the framework to build new and interesting utilities. This is a by-product of the very nature of PureMVC. Cliff architected the core framework in such a way that is is truly simple, providing [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
<p><a href="http://puremvc.org"><img class="aligncenter size-full wp-image-86" title="logo" src="http://69.164.207.135/wp-content/uploads/2008/09/logo.png" alt="" width="481" height="60" /></a></p>
<p>One of the many reasons I love <a href="http://www.puremvc.org/">PureMVC</a> is the community of highly intelligent, skilled, object-oriented (oriented) programmers that are constantly using the framework to build new and interesting utilities. This is a by-product of the very nature of PureMVC. <a href="http://www.linkedin.com/in/cliff">Cliff</a> architected the core framework in such a way that is is truly simple, providing a base from which to build new useful structures.</p>
<p><a href="http://forums.puremvc.org/index.php?topic=681.0">Fabrication, a new utility developed by Darshan Sawardekar</a> is a shining example of this fact. He has taken the <a href="http://puremvc.org/component/option,com_wrapper/Itemid,161/">PureMVC multi-core apperatus</a>, combined it with Cliff's <a href="http://puremvc.org/component/option,com_wrapper/Itemid,170/">Pipes utility</a>, and created a wonderfully abstracted means for creating modular PureMVC applications. Not only does this simplify the connection of modules in your application and allow them to communicate seamlessly, but he provides a router/firewall metaphor for controlling the communication as well as undo/redo functionality.</p>
<p>Thanks Darshan, your efforts are appreciated. And as always, thanks Cliff for providing the base from which our community can build and contribute. Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/09/16/fabrication-simplified-puremvc-multicore-modules-and-more/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>SuperPanelPlus: Resizable Flex Panel Component with Accessible Styling</title>
		<link>http://joelhooks.com/2008/05/26/superpanelplus-resizable-flex-panel-component-with-accessible-styling/</link>
		<comments>http://joelhooks.com/2008/05/26/superpanelplus-resizable-flex-panel-component-with-accessible-styling/#comments</comments>
		<pubDate>Mon, 26 May 2008 20:38:02 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[components]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[libraries]]></category>

		<guid isPermaLink="false">http://joelhooks.com/2008/05/26/superpanelplus-resizable-flex-panel-component-with-accessible-styling/</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
The SuperPanel is an excellent component created by Wietse Veenstra. The styling is all hard-coded,  and I need to be able to change this. It also hard-codes the event that is triggered on close, and I wanted to be able to control this. So I added the appropriate meta-tags and properties to enable these options. [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
<p>The <a href="http://www.wietseveenstra.nl/blog/2007/04/flex-superpanel-v15/">SuperPanel</a> is an excellent component created by <a href="http://www.wietseveenstra.nl/blog/about/">Wietse Veenstra</a>. The styling is all hard-coded,  and I need to be able to change this. It also hard-codes the event that is triggered on close, and I wanted to be able to control this. So I added the appropriate meta-tags and properties to enable these options. Here is the result, link to the source is at the bottom:</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_SuperPanelPlus_981876294"
			class="flashmovie"
			width="500"
			height="400">
	<param name="movie" value="http://joelhooks.com/examples/superPanelPlus/SuperPanelPlus.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://joelhooks.com/examples/superPanelPlus/SuperPanelPlus.swf"
			name="fm_SuperPanelPlus_981876294"
			width="500"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><a href="http://joelhooks.com/examples/superPanelPlus/srcview/">Source is here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/05/26/superpanelplus-resizable-flex-panel-component-with-accessible-styling/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Updated: Continuous scrolling image thumbnail and slideshow component for Flex.</title>
		<link>http://joelhooks.com/2008/05/24/updated-continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/</link>
		<comments>http://joelhooks.com/2008/05/24/updated-continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/#comments</comments>
		<pubDate>Sat, 24 May 2008 17:33:50 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://joelhooks.com/2008/05/24/updated-continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
I've updated this to a proper component implementation that can be found here. I've updated this component to allow for keyboard and forward/back navigation. I'm still improving it, refactoring, but it is almost finished. Here is the original post.]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
float:left;
position: fixed;
top: 60%;
left: 5px;
}

#leftcontainerBox .buttons {
float:left;
clear:both;
margin:4px 4px 4px 4px;

padding-bottom:2px;
}


#bottomcontainerBox {
height: 30px;
width:50%;
padding-top:1px;
}

#bottomcontainerBox .buttons {
float:left;
height: 30px;
margin:4px 4px 4px 4px;
}

</style>
<div class="note-block">I've updated this to a proper component implementation that can be found <a href="http://joelhooks.com/2009/12/24/continuous-scrolling-thumbnail-component-for-flex/">here</a>.</div>
<p>I've updated <a href="http://joelhooks.com/examples/slideShow/">this component</a> to allow for keyboard and forward/back navigation. I'm still improving it, <em>refactoring</em>, but it is almost finished.</p>
<p>Here is the <a href="http://joelhooks.com/2008/05/11/continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/">original post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelhooks.com/2008/05/24/updated-continuous-scrolling-image-thumbnail-and-slideshow-component-for-flex/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
	</channel>
</rss>

