<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>ricardo.poblete &#187; Flex</title>
	<atom:link href="http://ripoblet.wordpress.com/category/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://ripoblet.wordpress.com</link>
	<description>Adobe Flex, ActionScript 3, etc...</description>
	<lastBuildDate>Mon, 27 Apr 2009 02:13:05 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='ripoblet.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/95e9dea09bac0fc72b78337ae95f4d17?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>ricardo.poblete &#187; Flex</title>
		<link>http://ripoblet.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ripoblet.wordpress.com/osd.xml" title="ricardo.poblete" />
		<item>
		<title>Components Life Cycle</title>
		<link>http://ripoblet.wordpress.com/2009/04/22/components-life-cycle/</link>
		<comments>http://ripoblet.wordpress.com/2009/04/22/components-life-cycle/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 16:43:19 +0000</pubDate>
		<dc:creator>ripoblet</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://ripoblet.wordpress.com/?p=20</guid>
		<description><![CDATA[I&#8217;ve read this post and i want share wit you, very interesting

  Adobe Flex 3 Component Life Cycle
   
View more
    presentations
   from rjowen.
   

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ripoblet.wordpress.com&blog=3266342&post=20&subd=ripoblet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve read this post and i want share wit you, very interesting</p>
<div style="width:425px;text-align:left;" id="__ss_1256782">
  <a href="http://www.slideshare.net/rjowen/component-life-cycle?type=powerpoint" title="Adobe Flex 3 Component Life Cycle">Adobe Flex 3 Component Life Cycle<br />
   </a></p>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more<br />
    <a href="http://www.slideshare.net/">presentations</a><br />
   from <a href="http://www.slideshare.net/rjowen">rjowen</a>.
   </div>
</p></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ripoblet.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ripoblet.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ripoblet.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ripoblet.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ripoblet.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ripoblet.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ripoblet.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ripoblet.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ripoblet.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ripoblet.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ripoblet.wordpress.com&blog=3266342&post=20&subd=ripoblet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ripoblet.wordpress.com/2009/04/22/components-life-cycle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0eeca6f40ebdbe34ca78af11c2b08c92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ripoblet</media:title>
		</media:content>
	</item>
		<item>
		<title>Comunication between components &#8211; Flexcamp Chile 2008</title>
		<link>http://ripoblet.wordpress.com/2008/12/13/comunication-between-components-flexcamp-chile-2008/</link>
		<comments>http://ripoblet.wordpress.com/2008/12/13/comunication-between-components-flexcamp-chile-2008/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 14:41:27 +0000</pubDate>
		<dc:creator>ripoblet</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://ripoblet.wordpress.com/2008/12/13/comunication-between-components-flexcamp-chile-2008/</guid>
		<description><![CDATA[This is my presentation in spanish

regards
 Tagged: Flex      <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ripoblet.wordpress.com&blog=3266342&post=18&subd=ripoblet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://app.sliderocket.com/app/FullPlayer.aspx?id=ad65852b-3149-4de9-958d-3e3517f1eb3c">This is my presentation in spanish<br />
</a></p>
<p>regards</p>
 Tagged: Flex <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ripoblet.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ripoblet.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ripoblet.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ripoblet.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ripoblet.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ripoblet.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ripoblet.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ripoblet.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ripoblet.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ripoblet.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ripoblet.wordpress.com&blog=3266342&post=18&subd=ripoblet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ripoblet.wordpress.com/2008/12/13/comunication-between-components-flexcamp-chile-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0eeca6f40ebdbe34ca78af11c2b08c92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ripoblet</media:title>
		</media:content>
	</item>
		<item>
		<title>Restrict characters into a TextInput</title>
		<link>http://ripoblet.wordpress.com/2008/06/11/restrict-characters-into-a-textinput/</link>
		<comments>http://ripoblet.wordpress.com/2008/06/11/restrict-characters-into-a-textinput/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 15:54:59 +0000</pubDate>
		<dc:creator>ripoblet</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://ripoblet.wordpress.com/?p=13</guid>
		<description><![CDATA[You must use restrict property if you don&#8217;t want the user put a special char, like spaces, &#8216;, &#60;,&#62;, etc.
If you want restrict the space you must use &#60;mx:TextInput id=&#8221;txtInput&#8221; restrict=&#8221;^ &#8221; /&#62;
If you want restrict single quote you must use &#60;mx:TextInput id=&#8221;txtInput&#8221; restrict=&#8221;^&#8217;&#8221; /&#62;
If you want restrict double quote you must use &#60;mx:TextInput id=&#8221;txtInput&#8221; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ripoblet.wordpress.com&blog=3266342&post=13&subd=ripoblet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>You must use restrict property if you don&#8217;t want the user put a special char, like spaces, &#8216;, &lt;,&gt;, etc.</p>
<p>If you want restrict the space you must use &lt;mx:TextInput id=&#8221;txtInput&#8221; restrict=&#8221;^ &#8221; /&gt;</p>
<p>If you want restrict single quote you must use &lt;mx:TextInput id=&#8221;txtInput&#8221; restrict=&#8221;^&#8217;&#8221; /&gt;</p>
<p>If you want restrict double quote you must use &lt;mx:TextInput id=&#8221;txtInput&#8221; restrict=&#8221;^\&#8221;" /&gt;</p>
<p>If you want restrict single and double quote you must use &lt;mx:TextInput id=&#8221;txtInput&#8221; restrict=&#8221;^&#8217;\&#8221;" /&gt;</p>
<p>If you want restrict &lt; or &gt; you must use &lt;mx:TextInput id=&#8221;txtInput&#8221; restrict=&#8221;^&lt;&gt;&#8221; /&gt;</p>
<p> </p>
<p>Summary</p>
<p>If you want restrict some character you must use the restrict property and put into all characters that you don&#8217;t want user put into the text, but always beginnig with a ^ character.</p>
<p> </p>
<p>Regards</p>
<p> </p>
<p>ripoblet</p>
<p> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ripoblet.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ripoblet.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ripoblet.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ripoblet.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ripoblet.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ripoblet.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ripoblet.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ripoblet.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ripoblet.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ripoblet.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ripoblet.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ripoblet.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ripoblet.wordpress.com&blog=3266342&post=13&subd=ripoblet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ripoblet.wordpress.com/2008/06/11/restrict-characters-into-a-textinput/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0eeca6f40ebdbe34ca78af11c2b08c92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ripoblet</media:title>
		</media:content>
	</item>
		<item>
		<title>How to sort dates correctly with a datagrid column</title>
		<link>http://ripoblet.wordpress.com/2008/06/11/how-to-sort-dates-correctly-with-a-datagrid-column/</link>
		<comments>http://ripoblet.wordpress.com/2008/06/11/how-to-sort-dates-correctly-with-a-datagrid-column/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 14:15:11 +0000</pubDate>
		<dc:creator>ripoblet</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ripoblet.wordpress.com/?p=11</guid>
		<description><![CDATA[When we have datagrid column showing is a date field, but when retrive from database sometimes formated &#8220;DD/MM/YYYY HH24:mi&#8221; (oracle format), the datagrid column can&#8217;t sort correct because it&#8217;s trying to sort strings alphabetically and strings dates are not words, are dates. (obviously).
Example Preconditions: Objects in dataprovider have a &#8220;DATE&#8221; property with a string date, example &#8220;11/06/2008 17:45&#8243;
 
This [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ripoblet.wordpress.com&blog=3266342&post=11&subd=ripoblet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When we have datagrid column showing is a date field, but when retrive from database sometimes formated &#8220;DD/MM/YYYY HH24:mi&#8221; (oracle format), the datagrid column can&#8217;t sort correct because it&#8217;s trying to sort strings alphabetically and strings dates are not words, are dates. (obviously).</p>
<p>Example Preconditions: Objects in dataprovider have a &#8220;DATE&#8221; property with a string date, example &#8220;11/06/2008 17:45&#8243;</p>
<p> </p>
<p>This time the solution is</p>
<p>1) Transform strings format dates to date format dates</p>
<p>2) Create sort function</p>
<p>3) Set datagrid colum with the property &#8220;sortCompareFunction&#8221;</p>
<p> Code</p>
<p>1) Transform function called String2Date</p>
<p> <strong><span style="font-size:10pt;color:#0033ff;font-family:'Courier New';">private</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> </span><strong><span style="font-size:10pt;color:#339966;font-family:'Courier New';">function</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> String2Date(date:String):Date{</span></p>
<p class="MsoNormal" style="text-indent:35.4pt;margin:0;"><strong><span style="font-size:10pt;color:#6699cc;font-family:'Courier New';">var</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> day_month:Array = date.split(</span><strong><span style="font-size:10pt;color:#990000;font-family:'Courier New';">&#8216;/&#8217;</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';">); //cut day, month and year with hour </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>      </span></span><strong><span style="font-size:10pt;color:#6699cc;font-family:'Courier New';">var</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> day:int = </span><strong><span style="font-size:10pt;color:#0033ff;font-family:'Courier New';">new</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> Number(day_month[0]); </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>      </span></span><strong><span style="font-size:10pt;color:#6699cc;font-family:'Courier New';">var</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> month:int = </span><strong><span style="font-size:10pt;color:#0033ff;font-family:'Courier New';">new</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> Number(day_month[1]); </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>      </span></span><strong><span style="font-size:10pt;color:#6699cc;font-family:'Courier New';">var</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> year_hour:String = day_month[2];</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>      </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>      </span></span><strong><span style="font-size:10pt;color:#6699cc;font-family:'Courier New';">var</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> arr:Array = year_hour.split(</span><strong><span style="font-size:10pt;color:#990000;font-family:'Courier New';">&#8216; &#8216;</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';">); //cut year and hours with minutes separated by a space &#8221; &#8220;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>      </span></span><strong><span style="font-size:10pt;color:#6699cc;font-family:'Courier New';">var</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> year:int = </span><strong><span style="font-size:10pt;color:#0033ff;font-family:'Courier New';">new</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> Number(arr[0]); </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>      </span></span><strong><span style="font-size:10pt;color:#6699cc;font-family:'Courier New';">var</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> hour_minutes:String = arr[1];</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>                  </span><span> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>      </span></span><strong><span style="font-size:10pt;color:#6699cc;font-family:'Courier New';">var</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> arr2:Array = hour_minutes.split(</span><strong><span style="font-size:10pt;color:#990000;font-family:'Courier New';">&#8216;:&#8217;</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';">); // cut hour and minutes seperated by &#8220;:&#8221;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>      </span></span><strong><span style="font-size:10pt;color:#6699cc;font-family:'Courier New';">var</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> hour:int = </span><strong><span style="font-size:10pt;color:#0033ff;font-family:'Courier New';">new</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> Number(arr2[0]); </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>      </span></span><strong><span style="font-size:10pt;color:#6699cc;font-family:'Courier New';">var</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> minutes:int = </span><strong><span style="font-size:10pt;color:#0033ff;font-family:'Courier New';">new</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> Number(arr2[1]); </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>                  </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>      </span>v</span><strong><span style="font-size:10pt;color:#6699cc;font-family:'Courier New';">ar</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> date_date:Date = </span><strong><span style="font-size:10pt;color:#0033ff;font-family:'Courier New';">new</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> Date(year, month -1, day, year, minutes, 0, 0);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>            </span><span> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>      </span></span><strong><span style="font-size:10pt;color:#0033ff;font-family:'Courier New';">return</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> date_date;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';">}</span></p>
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';">2) Compare function called &#8220;sortDates&#8221;</span></p>
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><strong><span style="font-size:10pt;color:#0033ff;font-family:'Courier New';">public</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> </span><strong><span style="font-size:10pt;color:#339966;font-family:'Courier New';">function</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> sortDates(itemA:Object, itemB:Object):int {</span></p>
<p class="MsoNormal" style="text-indent:35.4pt;margin:0;"><strong><span style="font-size:10pt;color:#6699cc;font-family:'Courier New';">var</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> dateA:Date = String2Date(itemA.FECHA);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span> </span><span>     </span></span><strong><span style="font-size:10pt;color:#6699cc;font-family:'Courier New';">var</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> dateB:Date = String2Date(itemB.FECHA);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';"><span>      </span></span><strong><span style="font-size:10pt;color:#0033ff;font-family:'Courier New';">return</span></strong><span style="font-size:10pt;color:#000000;font-family:'Courier New';"> ObjectUtil.dateCompare(dateA, dateB);</span></p>
<p><span style="font-size:10pt;color:#000000;font-family:'Courier New';">}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';">3) <span style="font-size:10pt;color:#000000;font-family:'Courier New';">Finally set datagrid column, o suppose you have a defined column datagrid</span></span></p>
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;color:#0000ff;">&lt;mx:DataGridColumn </span><span style="font-size:x-small;">headerText=&#8221;</span><span style="font-size:x-small;color:#990000;">Date</span><span style="font-size:x-small;">&#8221; dataField=&#8221;</span><span style="font-size:x-small;color:#990000;">DATE</span><span style="font-size:x-small;">&#8221; sortCompareFunction=&#8221;</span><span style="font-size:x-small;color:#990000;">sortDates</span><span style="font-size:x-small;">&#8220;</span><span style="font-size:x-small;color:#0000ff;">/&gt;</span></p>
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';">Now you can sort dates in a datagrid.</span></p>
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';">PD: If you have a simple date string format like &#8220;DD/MMM/YYYY&#8221; modify String2Date function.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';">END</span></p>
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';">Regards</span></p>
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:#000000;font-family:'Courier New';">ripoblet</span></p>
<p> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ripoblet.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ripoblet.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ripoblet.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ripoblet.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ripoblet.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ripoblet.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ripoblet.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ripoblet.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ripoblet.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ripoblet.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ripoblet.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ripoblet.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ripoblet.wordpress.com&blog=3266342&post=11&subd=ripoblet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ripoblet.wordpress.com/2008/06/11/how-to-sort-dates-correctly-with-a-datagrid-column/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0eeca6f40ebdbe34ca78af11c2b08c92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ripoblet</media:title>
		</media:content>
	</item>
		<item>
		<title>Understand Events in Flex with examples, part 3 [working with components]</title>
		<link>http://ripoblet.wordpress.com/2008/05/14/understand-events-in-flex-with-examples-part-3-working-with-components/</link>
		<comments>http://ripoblet.wordpress.com/2008/05/14/understand-events-in-flex-with-examples-part-3-working-with-components/#comments</comments>
		<pubDate>Wed, 14 May 2008 04:55:29 +0000</pubDate>
		<dc:creator>ripoblet</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://ripoblet.wordpress.com/?p=10</guid>
		<description><![CDATA[Typically, flex applications is component based, I&#8217;m not talking about flex components framework, like combobox, datagrid, etc, i mean components like a composed with a canvas, a form inside it with controls that manage a specific thing in our application, etc, It could be a fully functionality. And a lot of times we need communicate this component with others [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ripoblet.wordpress.com&blog=3266342&post=10&subd=ripoblet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Typically, flex applications is component based, I&#8217;m not talking about flex components framework, like combobox, datagrid, etc, i mean components like a composed with a canvas, a form inside it with controls that manage a specific thing in our application, etc, It could be a fully functionality. And a lot of times we need communicate this component with others around it.</p>
<p>Goal, comunicate components, Let&#8217;s do it.</p>
<h2>Example_03</h2>
<address><strong>Functionality:</strong>The user needs operate 2 numbers, the operators are &#8220;add&#8221; (+) and &#8220;less&#8221; (-). The operators are inside a component and the main application have 3 text inputs, 2 textinput where user input the numbers to operate and a third with operation result .</address>
<p>We need a a MAIN application and a COMPONENT inside.</p>
<p><span style="text-decoration:underline;"><strong>OperatorComponent.mxml</strong></span></p>
<pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Canvas xmlns:mx="<a href="http://www.adobe.com/2006/mxml">http://www.adobe.com/2006/mxml</a>"
 	width="210" height="74"
  backgroundColor="#80ff80"&gt;
 &lt;mx:Metadata&gt;
  [Event(name="doOperation", type="flash.events.Event")]
 &lt;/mx:Metadata&gt;
  &lt;mx:Script&gt;
  &lt;![CDATA[
   import mx.collections.ArrayCollection;
   [Bindable]
   private var operators:ArrayCollection = new ArrayCollection([
             {"operator":"Select..."},
             {"operator":"add"},
             {"operator":"less"}]);
   
    private function closeHandler():void{
    //trigger an event when user select an operator
    dispatchEvent(new Event("doOperation"));
   }
  ]]&gt;
 &lt;/mx:Script&gt;
 
&lt;mx:Label x="10" y="10" text="Select operator"/&gt;
 &lt;mx:ComboBox id="comboOperation"
           dataProvider="{operators}"
           labelField="operator"
           x="10" y="36" width="190"
           close="closeHandler()"/&gt;
 
&lt;/mx:Canvas&gt;</pre>
<p>In OperatorComponent, the component expose the event that can trigger called &#8220;doOperation&#8221;, it&#8217;s means in the application when instance the component it will catch the event and do something, in this case operate the numbers.</p>
<p>This component have a green background and have a combobox inside a canvas, the combobox have a dataprovider called &#8220;operators&#8221; and display the &#8221;operator&#8221; property.</p>
<p>Now the container, the main application.</p>
<p><span style="text-decoration:underline;"><strong>MainPart3App.mxml</strong></span></p>
<pre><span style="font-family:Lucida Sans Unicode;">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="<a href="http://www.adobe.com/2006/mxml">http://www.adobe.com/2006/mxml</a>"
  xmlns:comp="*"
  layout="absolute" xmlns:local="*"&gt;
 
 &lt;mx:Script&gt;
  &lt;![CDATA[
    private function doOperationHandler(evt:Event):void{
    		//Obtain from father component the value of an object inside the son component
		var operator:String = component1.comboOperation.selectedItem.operator;
    		//It's a good practice obtain just one time the value
    
    		if (Number(value1.text) is Number &amp;&amp; Number(value2.text)){
     			//Verify the operation
     			if (operator == "add"){
      				result.text = String(Number(value1.text) + Number(value2.text));
     			}
     			else if (operator == "less"){
      				result.text = String(Number(value1.text) - Number(value2.text));
     			}
     			else {
      				result.text="";
     			}
    		}
    		else {
     			result.text="";
    		}</span>
<span style="font-family:Lucida Sans Unicode;">   	}
  ]]&gt;
 &lt;/mx:Script&gt;
 &lt;mx:Label x="49" y="59" text="Input the numbers"/&gt;
 &lt;mx:TextInput x="117" y="85" width="53" id="value1"/&gt;
 &lt;mx:TextInput x="117" y="115" width="53" id="value2"/&gt;
 &lt;mx:Label x="49" y="87" text="Value 1"/&gt;
 &lt;mx:Label x="49" y="117" text="Value 2"/&gt;
 &lt;mx:Label x="49" y="164" text="Result"/&gt;
 &lt;mx:TextInput x="117" y="162" width="53" id="result"/&gt;
 
 &lt;!-- set operator components--&gt;
 &lt;comp:OperatorComponent id="component1" x="247" y="85"
    doOperation="doOperationHandler(event);"/&gt;
 
&lt;/mx:Application&gt;</span></pre>
<p>First: When we expose events with metadata tags in components, the container above can capture the event, it means a listener for the event. In this case the application execute the function &#8220;doOperationHandler&#8221; when component trigger the event. In other words, when the combobox inside the component close the list, it dispatch an event called &#8220;doOperation&#8221; and the main application capture it and execute &#8220;doOperationHandler&#8221; and show the result.</p>
<p>OK, i hope you understand the example, i part4 will use 2 components, but the new component is into the OperatorComponent.</p>
<p> </p>
<p>Regards.</p>
<p>ripoblet</p>
<p> </p>
<p> </p>
<p> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ripoblet.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ripoblet.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ripoblet.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ripoblet.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ripoblet.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ripoblet.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ripoblet.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ripoblet.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ripoblet.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ripoblet.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ripoblet.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ripoblet.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ripoblet.wordpress.com&blog=3266342&post=10&subd=ripoblet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ripoblet.wordpress.com/2008/05/14/understand-events-in-flex-with-examples-part-3-working-with-components/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0eeca6f40ebdbe34ca78af11c2b08c92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ripoblet</media:title>
		</media:content>
	</item>
		<item>
		<title>Understand Events in Flex with examples, part 2</title>
		<link>http://ripoblet.wordpress.com/2008/05/14/understand-events-in-flex-with-examples-part-2/</link>
		<comments>http://ripoblet.wordpress.com/2008/05/14/understand-events-in-flex-with-examples-part-2/#comments</comments>
		<pubDate>Wed, 14 May 2008 03:06:04 +0000</pubDate>
		<dc:creator>ripoblet</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://ripoblet.wordpress.com/?p=9</guid>
		<description><![CDATA[This example shows how to implement  part 1 example with actionscript. I hope yo see the bubble again.
Example_02
&#60;?xml version="1.0" encoding="utf-8"?&#62;
&#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    creationComplete="onCreationComplete()"&#62;
 &#60;mx:Script&#62;
    &#60;![CDATA[
   	import mx.controls.Button;
   	import mx.containers.Panel;
   	import flash.events.MouseEvent;
   	import mx.controls.Alert;
   	private var myButton:Button;
   	private var myPanel:Panel;
   
   	// Handler function creationComplete event
   	private function onCreationComplete():void {
   	 	myPanel=new Panel();
    		myPanel.width=200;
    		myPanel.height=150;
    		myPanel.layout="absolute";
    		myPanel.title="I'm a Panel";
    		addChild(myPanel);
    		myButton = new Button();
    		myButton.label = "Click me";
    		myButton.x=60.5;
    		myButton.y=38;
    		myPanel.addChild (myButton);
    		// Add event click [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ripoblet.wordpress.com&blog=3266342&post=9&subd=ripoblet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This example shows how to implement  <a title="Exercice_01" href="http://ripoblet.wordpress.com/2008/04/18/understand-events-in-flex-with-examples-part1/" target="_blank">part 1</a> example with actionscript. I hope yo see the bubble again.</p>
<h2>Example_02</h2>
<pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="<a href="http://www.adobe.com/2006/mxml">http://www.adobe.com/2006/mxml</a>"
    creationComplete="onCreationComplete()"&gt;
 &lt;mx:Script&gt;
    &lt;![CDATA[
   	import mx.controls.Button;
   	import mx.containers.Panel;
   	import flash.events.MouseEvent;
   	import mx.controls.Alert;
   	private var myButton:Button;
   	private var myPanel:Panel;
   
   	// Handler function creationComplete event
   	private function onCreationComplete():void {
   	 	myPanel=new Panel();
    		myPanel.width=200;
    		myPanel.height=150;
    		myPanel.layout="absolute";
    		myPanel.title="I'm a Panel";
    		addChild(myPanel);
    		myButton = new Button();
    		myButton.label = "Click me";
    		myButton.x=60.5;
    		myButton.y=38;
    		myPanel.addChild (myButton);
    		// Add event click to the button
    		myButton.addEventListener(MouseEvent.CLICK, buttonClickHandler);
    		// Add event click to the panel
    		myPanel.addEventListener(MouseEvent.CLICK, panelClickHandler);
    		//myPanel.addEventListener(MouseEvent.CLICK, panelClickHandler, true);
   	}
   
	// The button click handler (the target phase)
   	private function buttonClickHandler(event:MouseEvent) :void{
   		Alert.show ("Event click on the button");
   	}

   	// The panel handler to demo bubbling
   	private function panelClickHandler(event:MouseEvent) :void{
   		Alert.show ("Event click on the panel");
   	}
  ]]&gt;
 &lt;/mx:Script&gt;
&lt;/mx:Application&gt;
 </pre>
<p>Now. The important is know how &#8220;say to the button&#8221;: listen the click over you, and to the panel too.</p>
<p>(Note: The examples one and two has been based on <a title="RIA Book 1.indd" href="http://res.sys-con.com/portlet/868/chapter4.pdf" target="_blank">theriabook</a> examples)</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ripoblet.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ripoblet.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ripoblet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ripoblet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ripoblet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ripoblet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ripoblet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ripoblet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ripoblet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ripoblet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ripoblet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ripoblet.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ripoblet.wordpress.com&blog=3266342&post=9&subd=ripoblet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ripoblet.wordpress.com/2008/05/14/understand-events-in-flex-with-examples-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0eeca6f40ebdbe34ca78af11c2b08c92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ripoblet</media:title>
		</media:content>
	</item>
		<item>
		<title>Understand Events in Flex with examples, part 1</title>
		<link>http://ripoblet.wordpress.com/2008/04/18/understand-events-in-flex-with-examples-part1/</link>
		<comments>http://ripoblet.wordpress.com/2008/04/18/understand-events-in-flex-with-examples-part1/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 04:43:32 +0000</pubDate>
		<dc:creator>ripoblet</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Adobe Flex]]></category>

		<guid isPermaLink="false">http://ripoblet.wordpress.com/?p=7</guid>
		<description><![CDATA[Today I begin a comment in examples that show you how manage events.
I separate this comment in 6 parts, this is the first part I talk about three basic concepts event, listener and dispatch in simple words.
Event: Indicate that something happend in somewhere. Is an object that have information about who triggered.
Listener: This is a method [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ripoblet.wordpress.com&blog=3266342&post=7&subd=ripoblet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today I begin a comment in examples that show you how manage events.</p>
<p>I separate this comment in 6 parts, this is the first part I talk about three basic concepts <strong>event</strong>, <strong>listener</strong> and <strong>dispatch</strong> in simple words<strong>.</strong></p>
<blockquote><p><strong>Event:</strong> <em>Indicate that something happend in somewhere. Is an object that have information about who triggered</em>.</p>
<p><strong>Listener:</strong> <em>This is a method that can &#8220;listen&#8221; or &#8220;hear&#8221; the event and do something when it happens (handler function)</em></p>
<address><strong>Dispatch</strong>: This is a method that can trigger an event.</address>
</blockquote>
<address></address>
<address></address>
<address></address>
<address></address>
<address><strong>Ok, let&#8217;s begin</strong></address>
<p style="text-align:left;"> </p>
<h2>Example_01</h2>
<pre> &lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" &gt;
            &lt;mx:Panel x="17.5" y="20"
		width="209" height="142" layout="absolute"
                  click="mx.controls.Alert.show('click event on the panel')"
		title="Panel"&gt;
            &lt;mx:Button label="ClickMe"
		x="60.5" y="38"
                  click="mx.controls.Alert.show('click event on the button')"/&gt;
            &lt;/mx:Panel&gt;
&lt;/mx:Application&gt;</pre>
<p> Save and run the example</p>
<p>Listeners: Panel and button component are listen the click event.   Both cases &#8220;Alert&#8221; is the handler unction</p>
<p>Dispatch: Flash player will trigger the event when user click on the button or somewhere in the panel.</p>
<p>Event: MouseEvent.CLICK</p>
<p> </p>
<p>You will see an important effect, bubble.</p>
<p>You must consider that are two components listening the same event and how the button is into the panel flash player propagate the event throgh the all components thar are registered to listen the event.</p>
<p>You are experimented the three phases in a flow event: Capturing, Target and Bubbling.</p>
<p>In the capturing phase, the plash player search every object who want to listen the event triggered recently, then, when find the object that triggered the event (capturing phase), it set some properties about the target and finally propagate (bubbling phase) the event to every object who want do something when &#8220;hear&#8221; or &#8220;listen&#8221; the event.</p>
<p>So, take care when two object are listening the same event, because they will do something.</p>
<p> </p>
<p>In the next sections we will see how can do the same thing, but with actionscript.</p>
<p> </p>
<p>Regards.</p>
<p>ripoblet</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ripoblet.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ripoblet.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ripoblet.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ripoblet.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ripoblet.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ripoblet.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ripoblet.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ripoblet.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ripoblet.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ripoblet.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ripoblet.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ripoblet.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ripoblet.wordpress.com&blog=3266342&post=7&subd=ripoblet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ripoblet.wordpress.com/2008/04/18/understand-events-in-flex-with-examples-part1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0eeca6f40ebdbe34ca78af11c2b08c92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ripoblet</media:title>
		</media:content>
	</item>
	</channel>
</rss>