<?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>Ryan Phelan &#187; MXML</title>
	<atom:link href="http://www.rphelan.com/tag/mxml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rphelan.com</link>
	<description>Exploring Flex, Design, and Visualization</description>
	<lastBuildDate>Thu, 12 Aug 2010 14:56:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>MXML Implementation of ChangeWatcher</title>
		<link>http://www.rphelan.com/2008/04/10/mxml-implementation-of-changewatcher/</link>
		<comments>http://www.rphelan.com/2008/04/10/mxml-implementation-of-changewatcher/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 14:15:22 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Custom Components]]></category>
		<category><![CDATA[MXML]]></category>

		<guid isPermaLink="false">http://www.rphelan.com/?p=25</guid>
		<description><![CDATA[I often find myself needing a simple implementation of ChangeWatcher. I make a CreationComplete event handler for a component, create the ChangeWatcher, create a listener function, and do some simple action in the listener. I was thinking today that it would be nice if you could do all this in one line of mxml (like [...]]]></description>
			<content:encoded><![CDATA[<p>I often find myself needing a simple implementation of ChangeWatcher.  I make a CreationComplete event handler for a component, create the ChangeWatcher, create a listener function, and do some simple action in the listener.  I was thinking today that it would be nice if you could do all this in one line of mxml (like the mx:binding tag).  So, I created the RPChangeWatcher which does just that.</p>
<p>I have to credit <a href="http://brianjoseph31.typepad.com/smashedapples/2008/02/who-wants-to-se.html">Brian Holmes</a> for  providing a really easy way to  do non-visual components without extending UIComponent.  This makes the RPChangeWatcher (thusly named to avoid namespace conflicts) really lightweight.  Check out the sample application:</p>
<p><a href="http://www.rphelan.com/flex/MXMLChangeWatcher/MXMLChangeWatcher.html">application</a> -  <a href="http://www.rphelan.com/flex/MXMLChangeWatcher/srcview/index.html">source</a></p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_MXMLChangeWatcher_218925980"
			class="flashmovie"
			width="450"
			height="240">
	<param name="movie" value="http://www.rphelan.com/flex/MXMLChangeWatcher/MXMLChangeWatcher.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.rphelan.com/flex/MXMLChangeWatcher/MXMLChangeWatcher.swf"
			name="fm_MXMLChangeWatcher_218925980"
			width="450"
			height="240">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>This is a very simple example, but imagine you're using some form of MVC and the currentDP being a variable in your model.  This particular view doesn't care how or why currentDP gets updated, it just wants to display an animation to transition between datasets.  That isn't possible using regular data binding, but it's pretty clean and simple with an mxml ChangeWatcher.</p>
<p>I haven't experimented with this a lot yet, but given that you can use data binding on the host and chain properties, I can see some potential for some pretty advanced use cases.</p>
<p>Any thoughts?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rphelan.com/2008/04/10/mxml-implementation-of-changewatcher/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
