<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Flex 4 Component States vs. Skin States</title>
	<atom:link href="http://saturnboy.com/2009/09/flex4-component-states-skin-states/feed/" rel="self" type="application/rss+xml" />
	<link>http://saturnboy.com/2009/09/flex4-component-states-skin-states/</link>
	<description>Code, Work, and Life</description>
	<lastBuildDate>Wed, 25 Aug 2010 09:44:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Jake</title>
		<link>http://saturnboy.com/2009/09/flex4-component-states-skin-states/comment-page-1/#comment-182</link>
		<dc:creator>Jake</dc:creator>
		<pubDate>Sun, 15 Aug 2010 16:49:59 +0000</pubDate>
		<guid isPermaLink="false">http://saturnboy.com/?p=692#comment-182</guid>
		<description>Great article.  Clear and comprehensive, thanks man!</description>
		<content:encoded><![CDATA[<p>Great article.  Clear and comprehensive, thanks man!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justin</title>
		<link>http://saturnboy.com/2009/09/flex4-component-states-skin-states/comment-page-1/#comment-152</link>
		<dc:creator>justin</dc:creator>
		<pubDate>Thu, 24 Jun 2010 16:33:01 +0000</pubDate>
		<guid isPermaLink="false">http://saturnboy.com/?p=692#comment-152</guid>
		<description>@John - yes, nowadays, I also tend to write my custom components in AS3 rather than MXML for most cases.  But I&#039;ll still use MXML when my custom component contains a bunch of other components (thereby leveraging the power of MXML to add and layout components).

And yes, compound skin states are cool.  I just wrote a custom button with:

&lt;code&gt;return super.getCurrentSkinState() + (alerted ? &#039;AndAlerted&#039; : &#039;&#039;);&lt;/code&gt;

So my states where: &lt;code&gt;up&lt;/code&gt;, &lt;code&gt;over&lt;/code&gt;, &lt;code&gt;down&lt;/code&gt;, &lt;code&gt;disabled&lt;/code&gt; and &lt;code&gt;upAndAlerted&lt;/code&gt;, &lt;code&gt;overAndAlerted&lt;/code&gt;, &lt;code&gt;downAndAlerted&lt;/code&gt;, &lt;code&gt;disabledAndAlerted&lt;/code&gt;.</description>
		<content:encoded><![CDATA[<p>@John &#8211; yes, nowadays, I also tend to write my custom components in AS3 rather than MXML for most cases.  But I&#8217;ll still use MXML when my custom component contains a bunch of other components (thereby leveraging the power of MXML to add and layout components).</p>
<p>And yes, compound skin states are cool.  I just wrote a custom button with:</p>
<p><code>return super.getCurrentSkinState() + (alerted ? 'AndAlerted' : '');</code></p>
<p>So my states where: <code>up</code>, <code>over</code>, <code>down</code>, <code>disabled</code> and <code>upAndAlerted</code>, <code>overAndAlerted</code>, <code>downAndAlerted</code>, <code>disabledAndAlerted</code>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Hicks</title>
		<link>http://saturnboy.com/2009/09/flex4-component-states-skin-states/comment-page-1/#comment-150</link>
		<dc:creator>John Hicks</dc:creator>
		<pubDate>Thu, 24 Jun 2010 04:59:59 +0000</pubDate>
		<guid isPermaLink="false">http://saturnboy.com/?p=692#comment-150</guid>
		<description>Yes, thank you Justin especially for that last step, where you compound the states. 

I do all components in AS3 and only the skins in MXML.  Extend SkinnableComponent and override at most seven methods:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;set&lt;/code&gt; - set property and call invalidateProperties()&lt;/li&gt;
&lt;li&gt;&lt;code&gt;invalidateProperties()&lt;/code&gt; - say properties have changed&lt;/li&gt;
&lt;li&gt;&lt;code&gt;commitProperties()&lt;/code&gt; - act on combination of properties&lt;/li&gt;
&lt;li&gt;&lt;code&gt;invalidateDisplay()&lt;/code&gt; - if property change should change display&lt;/li&gt;
&lt;li&gt;&lt;code&gt;updateDisplayList()&lt;/code&gt; - only if you must intrude on layout...&lt;/li&gt;
&lt;li&gt;&lt;code&gt;getCurrentSkinState()&lt;/code&gt; - when skin needs to know what to show...&lt;/li&gt;
&lt;li&gt;&lt;code&gt;partAdded()&lt;/code&gt; - watch for parts you need to initialize (addEventListener, etc)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;partRemoved()&lt;/code&gt; - clean up whatever partAdded() did&lt;/li&gt;
&lt;/ul&gt;

John Hicks</description>
		<content:encoded><![CDATA[<p>Yes, thank you Justin especially for that last step, where you compound the states. </p>
<p>I do all components in AS3 and only the skins in MXML.  Extend SkinnableComponent and override at most seven methods:</p>
<ul>
<li><code>set</code> &#8211; set property and call invalidateProperties()</li>
<li><code>invalidateProperties()</code> &#8211; say properties have changed</li>
<li><code>commitProperties()</code> &#8211; act on combination of properties</li>
<li><code>invalidateDisplay()</code> &#8211; if property change should change display</li>
<li><code>updateDisplayList()</code> &#8211; only if you must intrude on layout&#8230;</li>
<li><code>getCurrentSkinState()</code> &#8211; when skin needs to know what to show&#8230;</li>
<li><code>partAdded()</code> &#8211; watch for parts you need to initialize (addEventListener, etc)</li>
<li><code>partRemoved()</code> &#8211; clean up whatever partAdded() did</li>
</ul>
<p>John Hicks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pavel Jacko</title>
		<link>http://saturnboy.com/2009/09/flex4-component-states-skin-states/comment-page-1/#comment-54</link>
		<dc:creator>Pavel Jacko</dc:creator>
		<pubDate>Mon, 16 Nov 2009 17:41:01 +0000</pubDate>
		<guid isPermaLink="false">http://saturnboy.com/?p=692#comment-54</guid>
		<description>This is great post! I used this technique on article about different solutions for skinning in Flex 4 here: http://blog.paveljacko.com/?p=29</description>
		<content:encoded><![CDATA[<p>This is great post! I used this technique on article about different solutions for skinning in Flex 4 here: <a href="http://blog.paveljacko.com/?p=29" rel="nofollow">http://blog.paveljacko.com/?p=29</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justin</title>
		<link>http://saturnboy.com/2009/09/flex4-component-states-skin-states/comment-page-1/#comment-47</link>
		<dc:creator>justin</dc:creator>
		<pubDate>Tue, 03 Nov 2009 16:50:54 +0000</pubDate>
		<guid isPermaLink="false">http://saturnboy.com/?p=692#comment-47</guid>
		<description>I love MXML, especially with the advances made in Flex 4.  But if you have to go with AS3, just listen for the &lt;code&gt;FlexEvent.ENTER_STATE&lt;/code&gt; event:
&lt;pre&gt;var s:State = new State();
s.name = &#039;foo&#039;;
s.addEventListener(FlexEvent.ENTER_STATE, enterStateHandler);&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I love MXML, especially with the advances made in Flex 4.  But if you have to go with AS3, just listen for the <code>FlexEvent.ENTER_STATE</code> event:</p>
<pre>var s:State = new State();
s.name = 'foo';
s.addEventListener(FlexEvent.ENTER_STATE, enterStateHandler);</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Dumaine</title>
		<link>http://saturnboy.com/2009/09/flex4-component-states-skin-states/comment-page-1/#comment-46</link>
		<dc:creator>Jonathan Dumaine</dc:creator>
		<pubDate>Tue, 03 Nov 2009 16:18:54 +0000</pubDate>
		<guid isPermaLink="false">http://saturnboy.com/?p=692#comment-46</guid>
		<description>Great post! Thanks, Justin!

Now I just have to figure out how to get enterState syntax on an AS only component.</description>
		<content:encoded><![CDATA[<p>Great post! Thanks, Justin!</p>
<p>Now I just have to figure out how to get enterState syntax on an AS only component.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
