<?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>JabbyPanda’s travel to RIA world &#187; Adobe Flex</title>
	<atom:link href="http://www.jabbypanda.com/blog/category/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jabbypanda.com/blog</link>
	<description>it's RIA, not Rio</description>
	<lastBuildDate>Sun, 18 Sep 2011 22:53:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Applying selection dynamically to Spark RichText component</title>
		<link>http://www.jabbypanda.com/blog/2010/02/applying-dynamically-selection-to-spark-richtext-component/</link>
		<comments>http://www.jabbypanda.com/blog/2010/02/applying-dynamically-selection-to-spark-richtext-component/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 16:56:28 +0000</pubDate>
		<dc:creator>JabbyPanda</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>

		<guid isPermaLink="false">http://www.jabbypanda.com/blog/?p=103</guid>
		<description><![CDATA[Flex 4 documentation article named "Selecting and modifying text" lists an finite final list of components that supports the selection: RichEditableText Label (Spark only) TextInput (both MX and Spark) TextArea (both MX and Spark) RichTextEditor and all controls that have a TextArea as a subcomponent &#160;&#160;&#160;This list does not include RichText component, but luckily with [...]]]></description>
			<content:encoded><![CDATA[<p>Flex 4 documentation article named <a href="http://help.adobe.com/en_US/Flex/4.0/html/WS2db454920e96a9e51e63e3d11c0bf69084-7d44.html">"Selecting and modifying text"</a> lists an finite final list of components that supports the selection:</p>
<ul>
<li>RichEditableText</li>
<li>Label (Spark only)</li>
<li>TextInput (both MX and Spark)</li>
<li>TextArea (both MX and Spark)</li>
<li>RichTextEditor and all controls that have a TextArea as a subcomponent</li>
</ul>
<p>&nbsp;&nbsp;&nbsp;This list does not include RichText component, but luckily with a new Text Layout Framework (TLF) available starting from Flash player 10, it is quite easy to "simulate" dynamic selection of the text with some ActionScript 3 code.</p>
<p>&nbsp;&nbsp;&nbsp;In the following example, try to drag the slider to the left and to the right to control the dynamic selection of the text of RichText component:</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Test_RichText_765972402"
			class="flashmovie"
			width="200"
			height="75">
	<param name="movie" value="http://jabbypanda.com/labs/richTextFormatted/Test_RichText.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://jabbypanda.com/labs/richTextFormatted/Test_RichText.swf"
			name="fm_Test_RichText_765972402"
			width="200"
			height="75">
	<!--<![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>
<p>Code listing:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:Application</span> <span style="color: #000066;">xmlns:fx</span>=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #009900;">               <span style="color: #000066;">xmlns:s</span>=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #009900;">               <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span></span>
<span style="color: #009900;">               <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;200&quot;</span></span>
<span style="color: #009900;">               <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;75&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:layout<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:HorizontalLayout</span> <span style="color: #000066;">paddingLeft</span>=<span style="color: #ff0000;">&quot;25&quot;</span></span>
<span style="color: #009900;">                            <span style="color: #000066;">paddingTop</span>=<span style="color: #ff0000;">&quot;25&quot;</span></span>
<span style="color: #009900;">                            <span style="color: #000066;">paddingRight</span>=<span style="color: #ff0000;">&quot;25&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:layout<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #339933;">&lt;![CDATA[            </span>
<span style="color: #339933;">            import flashx.textLayout.edit.EditManager;</span>
<span style="color: #339933;">            import flashx.textLayout.edit.SelectionState;</span>
<span style="color: #339933;">            import flashx.textLayout.formats.TextLayoutFormat;            </span>
&nbsp;
<span style="color: #339933;">            protected function highlightItem(endSelectionCharIndex : int):void</span>
<span style="color: #339933;">            {</span>
<span style="color: #339933;">                var containerFormat:TextLayoutFormat = new TextLayoutFormat();                </span>
<span style="color: #339933;">                var paragraphFormat:TextLayoutFormat = new TextLayoutFormat();                </span>
<span style="color: #339933;">                var characterFormat:TextLayoutFormat = new TextLayoutFormat();</span>
&nbsp;
<span style="color: #339933;">                characterFormat = _selectedTextFormat;</span>
&nbsp;
<span style="color: #339933;">                var selectionState : SelectionState = new SelectionState(rt.textFlow, 0, endSelectionCharIndex, _selectedTextFormat);                </span>
&nbsp;
<span style="color: #339933;">                // apply format to the selection</span>
<span style="color: #339933;">                _textEditManager.applyFormat(</span>
<span style="color: #339933;">                    characterFormat, </span>
<span style="color: #339933;">                    paragraphFormat, </span>
<span style="color: #339933;">                    containerFormat, </span>
<span style="color: #339933;">                    selectionState);                                </span>
&nbsp;
<span style="color: #339933;">                characterFormat = _notSelectedTextFormat;                </span>
&nbsp;
<span style="color: #339933;">                // apply format to the rest of the text</span>
<span style="color: #339933;">                var notSelectionState : SelectionState = new SelectionState(rt.textFlow, endSelectionCharIndex, rt.text.length, _notSelectedTextFormat);                </span>
<span style="color: #339933;">                _textEditManager.applyFormat(</span>
<span style="color: #339933;">                    characterFormat, paragraphFormat, containerFormat, notSelectionState);</span>
<span style="color: #339933;">            }</span>
&nbsp;
&nbsp;
<span style="color: #339933;">            protected function onRichTextCreationComplete():void</span>
<span style="color: #339933;">            {</span>
<span style="color: #339933;">                _textEditManager = new EditManager();</span>
<span style="color: #339933;">                rt.textFlow.interactionManager = _textEditManager;</span>
&nbsp;
<span style="color: #339933;">                _selectedTextFormat = new TextLayoutFormat();</span>
<span style="color: #339933;">                _selectedTextFormat.backgroundColor = 0xFF99CC;</span>
<span style="color: #339933;">                _selectedTextFormat.color = 0x000000;</span>
&nbsp;
<span style="color: #339933;">                _notSelectedTextFormat = new TextLayoutFormat();</span>
<span style="color: #339933;">                _notSelectedTextFormat.backgroundColor = 0xFFFFFF;</span>
<span style="color: #339933;">                _notSelectedTextFormat.color = 0x000000;</span>
<span style="color: #339933;">            }</span>
&nbsp;
<span style="color: #339933;">            private var _textEditManager : EditManager;</span>
&nbsp;
<span style="color: #339933;">            private var _selectedTextFormat : TextLayoutFormat;</span>
&nbsp;
<span style="color: #339933;">            private var _notSelectedTextFormat : TextLayoutFormat;            </span>
&nbsp;
<span style="color: #339933;">        ]]&gt;</span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>                   
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:RichText</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;rt&quot;</span> <span style="color: #000066;">text</span>=<span style="color: #ff0000;">&quot;Sample text&quot;</span> </span>
<span style="color: #009900;">                <span style="color: #000066;">creationComplete</span>=<span style="color: #ff0000;">&quot;onRichTextCreationComplete()&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:HSlider</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;slider&quot;</span> </span>
<span style="color: #009900;">              <span style="color: #000066;">minimum</span>=<span style="color: #ff0000;">&quot;0&quot;</span> </span>
<span style="color: #009900;">              <span style="color: #000066;">maximum</span>=<span style="color: #ff0000;">&quot;10&quot;</span> </span>
<span style="color: #009900;">              <span style="color: #000066;">change</span>=<span style="color: #ff0000;">&quot;highlightItem(slider.value)&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>        
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:HSlider<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>        
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:Application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.jabbypanda.com/blog/2010/02/applying-dynamically-selection-to-spark-richtext-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When overriding &#8220;commitProperties&#8221; put &#8220;super.commitProperties&#8221; call to the end of the method</title>
		<link>http://www.jabbypanda.com/blog/2010/02/when-overriding-commitproperties-put-super-commitproperties-call-to-the-end-of-the-method/</link>
		<comments>http://www.jabbypanda.com/blog/2010/02/when-overriding-commitproperties-put-super-commitproperties-call-to-the-end-of-the-method/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 17:09:23 +0000</pubDate>
		<dc:creator>JabbyPanda</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Adobe Flex 4]]></category>

		<guid isPermaLink="false">http://www.jabbypanda.com/blog/?p=255</guid>
		<description><![CDATA[My use-case &#160;&#160;&#160;Recently I've tried to introduce skin states to the pretty complex UI component in Adobe Flex 4. I have got puzzled by the behaviour that my invalidateSkinState() calls never had triggered execution of getCurrentSkinState method that controlls the current UI component skin state value as expected. &#160;&#160;&#160;Under closer examination I found out that [...]]]></description>
			<content:encoded><![CDATA[<p><strong>My use-case</strong><br />
&nbsp;&nbsp;&nbsp;Recently I've tried to introduce skin states to the pretty complex UI component in Adobe Flex 4. I have got puzzled by the behaviour that my <em>invalidateSkinState()</em> calls never had triggered execution of <em>getCurrentSkinState</em> method that controlls the current UI component skin state value as expected. </p>
<div class="simplePullQuote">Invalidation of the same phase while processing that phase is ignored - by Alex Harui</div>
<p>&nbsp;&nbsp;&nbsp;Under closer examination I found out that I fall into the same invalidation trap that <em>James Polanco</em> did in <a href="http://www.developmentarc.com/site/2010/11/invalidateskinstate-trap">November 2010</a>. </p>
<p>&nbsp;&nbsp;&nbsp;I must stress out that it was easy to fall into this trap in my case because inside "commitProperties" call I was doing pretty complex calculations that involved, for example, the creation of display object sub-children, listening for "preinitialize" events from those sub-children, reacting to it, etc.</p>
<p>&nbsp;&nbsp;&nbsp; To cut the talk short, to prevent this property invalidation trap from happening I suggest to always follow the simple rule of the thumb:</p>
<blockquote><p>When overriding "commitProperties" put "super.commitProperties" call to the end of the method</p></blockquote>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">override protected <span style="color: #000000; font-weight: bold;">function</span> commitProperties<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>myPropertyChanged<span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>        
        disableMyUIComponent = <span style="color: #000000; font-weight: bold;">true</span>;
        invalidateSkinState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        myPropertyChanged = <span style="color: #000000; font-weight: bold;">false</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #0066CC;">super</span>.<span style="color: #006600;">commitProperties</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
override protected <span style="color: #000000; font-weight: bold;">function</span> getCurrentSkinState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">String</span> <span style="color: #66cc66;">&#123;</span> 
    <span style="color: #000000; font-weight: bold;">var</span> returnState:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;normal&quot;</span>; 
&nbsp;
    <span style="color: #808080; font-style: italic;">// Use information in the class to determine the new view state of the skin class. </span>
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>disableMyUIComponent<span style="color: #66cc66;">&#41;</span>     <span style="color: #66cc66;">&#123;</span> 
        returnState = <span style="color: #ff0000;">&quot;disabled&quot;</span>; 
    <span style="color: #66cc66;">&#125;</span> 
    <span style="color: #b1b100;">return</span> returnState; 
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Futher reading:<br />
Discussion at 2008 at Flexcoders mailing list (yeah, at that time, this mailing list was more interesting to read) <a href="http://www.mail-archive.com/flexcoders@yahoogroups.com/msg100622.html">"Must call super.commitProperties at END of overrided commitProperties when extending XXXX?"</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jabbypanda.com/blog/2010/02/when-overriding-commitproperties-put-super-commitproperties-call-to-the-end-of-the-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When it is time to reset dirty flag &#8220;invalidatePropertiesFlag&#8221; in Flex invalidation framework?</title>
		<link>http://www.jabbypanda.com/blog/2009/12/when-it-is-time-to-reset-dirty-flag-invalidatepropertiesflag-in-flex-invalidation-framework/</link>
		<comments>http://www.jabbypanda.com/blog/2009/12/when-it-is-time-to-reset-dirty-flag-invalidatepropertiesflag-in-flex-invalidation-framework/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 18:02:28 +0000</pubDate>
		<dc:creator>JabbyPanda</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[AdobeFlex]]></category>

		<guid isPermaLink="false">http://www.jabbypanda.com/blog/?p=54</guid>
		<description><![CDATA[&#160;&#160;&#160;Invalidation in Flex is a mechanism by which changes made to a component's property values are queued and postponed for the final procession till the end of the current Flash movie frame play. This property value invalidation mechanism in Flex is controlled by setting and resetting boolean variables called dirty flags. &#160;&#160;&#160;One of such a [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;Invalidation in Flex is a mechanism by which changes made to a component's property values are queued and postponed for the final procession till the end of the current Flash movie frame play. This property value invalidation mechanism in Flex is controlled by setting and resetting boolean variables called <em><strong>dirty flags</strong></em>. </p>
<p>&nbsp;&nbsp;&nbsp;One of such a dirty flags used internally in Flex invalidation mechanism is <em>invalidatePropertiesFlag</em> flag.</p>
<p>&nbsp;&nbsp;&nbsp;This particular flag is reset in <em>validateProperties()</em> method from mx.core.UIComponent class from Flex 3 SDK:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> validateProperties<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>invalidatePropertiesFlag<span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
        commitProperties<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        invalidatePropertiesFlag = <span style="color: #000000; font-weight: bold;">false</span>;
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>&nbsp;&nbsp;&nbsp;Inside <em>commitProperties()</em> function the actual change occur to the invalidated property's value, for example, it can be "width" property.</p>
<p>&nbsp;&nbsp;&nbsp;The question is - why dirty flag <em>invalidatePropertiesFlag</em> is reset <strong>after</strong> call to <em>commitProperties()</em> method, but not <strong>before</strong> this call?</p>
<p>&nbsp;&nbsp;&nbsp; My far-fetched speculation is that this had happened because:</p>
<ul>
<li> It is just a matter of life == code convention to put the dirty flag at the end of IF block;</li>
<li>If code within <em>commitProperties()</em> raises RTE, we will still have a chance to execute the code in <em>commitProperties()</em> during playing next frame in Flash Player and this time maybe the code will not throw RTE.</li>
</ul>
<p>&nbsp;&nbsp;&nbsp;At this point, you may start to wonder why the exact location (at the very beginning or at the very end of IF sequence) of the dirty flag can be important?</p>
<p>&nbsp;&nbsp;&nbsp;The reason is:</p>
<p>&nbsp;&nbsp;&nbsp;If the code within <em>commitProperties()</em> implementation will try to invalidate some <font color="#FF0000">other</font> component's property (e.g "height" property) that tries to invoke another invalidation routine by using dirty flag, then this invalidation call will not be added to <em>mx.managers.LayoutManager.invalidatePropertiesQueue</em>, because dirty flag <em>invalidatePropertiesFlag</em> is still equal to true, see the listing of  <em>invalidateProperties</em> method from UIComponent for the method logic:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> invalidateProperties<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span>invalidatePropertiesFlag<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#123;</span>
            invalidatePropertiesFlag = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
            <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>parent <span style="color: #66cc66;">&amp;&amp;</span> UIComponentGlobals.<span style="color: #006600;">layoutManager</span><span style="color: #66cc66;">&#41;</span>
                UIComponentGlobals.<span style="color: #006600;">layoutManager</span>.<span style="color: #006600;">invalidateProperties</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.jabbypanda.com/blog/2009/12/when-it-is-time-to-reset-dirty-flag-invalidatepropertiesflag-in-flex-invalidation-framework/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>NEVER use selectable=false for editable List or DataGrid Flex components</title>
		<link>http://www.jabbypanda.com/blog/2009/06/never-use-selectablefalse-for-editable-or/</link>
		<comments>http://www.jabbypanda.com/blog/2009/06/never-use-selectablefalse-for-editable-or/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 14:11:44 +0000</pubDate>
		<dc:creator>JabbyPanda</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[AdobeFlex]]></category>

		<guid isPermaLink="false">http://www.jabbypanda.com/blog/?p=41</guid>
		<description><![CDATA[It is very likely that the authors of Adobe Flex SDK have never devised the following simple use-case for both List and DataGrid components from Flex SDK: "selectable" property is set to false "editable" property is set to true To prove this fact, try to play with the following samples: mx:List 
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_list_testcase_102061248"
			class="flashmovie"
			width="400"
			height="300">
	<param name="movie" value="http://www.jabbypanda.com/labs/selectableDataGrid/list_testcase.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.jabbypanda.com/labs/selectableDataGrid/list_testcase.swf"
			name="fm_list_testcase_102061248"
			width="400"
			height="300">
	<!--<![endif]-->
		]]></description>
			<content:encoded><![CDATA[<p>It is very likely that the authors of Adobe Flex SDK have never devised the following simple use-case for both List and DataGrid components from Flex SDK:</p>
<li> "selectable" property is set to <em>false</em>
<li> "editable" property is set to <em>true</em>
<p>To prove this fact, try to play with the following samples:</p>
<p><u><strong>mx:List </strong></u></p>
<p>[kml_flashembed publishmethod="static" fversion="9.0.0" movie="http://www.jabbypanda.com/labs/selectableDataGrid/list_testcase.swf" width="400" height="300" targetclass="flashmovie"]</p>
<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>
<p>Click the first row, in a List,  then the itemEditor appears on the first row.<br />
Click the second row in a List , but the itemEditor doesn't appear on the second row </p>
<p>That's <a href="http://bugs.adobe.com/jira/browse/SDK-15309">bug SDK-15309</a>, documented over year ago.</p>
<p><u><strong>mx:DataGrid</strong></u></p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_TestDataGrid_1180119347"
			class="flashmovie"
			width="400"
			height="300">
	<param name="movie" value="http://www.jabbypanda.com/labs/selectableDataGrid/TestDataGrid.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.jabbypanda.com/labs/selectableDataGrid/TestDataGrid.swf"
			name="fm_TestDataGrid_1180119347"
			width="400"
			height="300">
	<!--<![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>
<p>Code listing:</p>

<div class="wp_syntax"><table><tr><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
44
45
46
47
48
49
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Application</span> <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">creationComplete</span>=<span style="color: #ff0000;">&quot;initApp();&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;400&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;300&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">styleName</span>=<span style="color: #ff0000;">&quot;plain&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">paddingLeft</span>=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">paddingRight</span>=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">paddingTop</span>=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #009900;">                <span style="color: #000066;">paddingBottom</span>=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #339933;">&lt;![CDATA[</span>
<span style="color: #339933;">            import mx.events.DataGridEvent;</span>
&nbsp;
<span style="color: #339933;">            private function initApp():void {</span>
<span style="color: #339933;">                dg.dataProvider =                     [</span>
<span style="color: #339933;">                    {Artist:'Carole King', Album:'Tapestry', Price:11.99},</span>
<span style="color: #339933;">                    {Artist:'Paul Simon', Album:'Graceland', Price:10.99},</span>
<span style="color: #339933;">                    {Artist:'Original Cast', Album:'Camelot', Price:12.99},</span>
<span style="color: #339933;">                    {Artist:'The Beatles', Album:'The White Album', Price:11.99}</span>
<span style="color: #339933;">                    ];</span>
<span style="color: #339933;">            }</span>
&nbsp;
<span style="color: #339933;">            private function onItemEditBegin(event : DataGridEvent) : void</span>
<span style="color: #339933;">            {</span>
<span style="color: #339933;">                trace (&quot;DG onItemEditBegin&quot;);</span>
<span style="color: #339933;">            }</span>
&nbsp;
<span style="color: #339933;">        ]]&gt;</span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:DataGrid</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;dg&quot;</span></span>
<span style="color: #009900;">                 <span style="color: #000066;">rowHeight</span>=<span style="color: #ff0000;">&quot;20&quot;</span></span>
<span style="color: #009900;">                 <span style="color: #000066;">editable</span>=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #009900;">                 <span style="color: #000066;">selectable</span>=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #009900;">                 <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;100%&quot;</span></span>
<span style="color: #009900;">                 <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;100%&quot;</span></span>
<span style="color: #009900;">                 <span style="color: #000066;">itemEditBegin</span>=<span style="color: #ff0000;">&quot;onItemEditBegin(event)&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:columns<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:DataGridColumn</span></span>
<span style="color: #009900;">                               <span style="color: #000066;">dataField</span>=<span style="color: #ff0000;">&quot;Artist&quot;</span></span>
<span style="color: #009900;">                               <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;100&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:DataGridColumn<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:DataGridColumn</span></span>
<span style="color: #009900;">                               <span style="color: #000066;">dataField</span>=<span style="color: #ff0000;">&quot;Album&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:DataGridColumn</span></span>
<span style="color: #009900;">                               <span style="color: #000066;">dataField</span>=<span style="color: #ff0000;">&quot;Price&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:columns<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:DataGrid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Now, try to click on the DataGrid header, oops, you've just hit <a href="http://bugs.adobe.com/jira/browse/SDK-19436">SDK-19436 bug</a> (itemEditor instance is created unwillingly at first column, first row of DataGrid).</p>
<p>Then try to scroll the DataGrid with scroller buttons, and again you've hit another, albeit similar, <a href="http://bugs.adobe.com/jira/browse/SDK-21726">SDK-21726 bug</a> (itemEditor instance is created unwillingly at first column, first row of DataGrid).</p>
<p>Now scroll the contents of Datagrid a little bit down with a scroller thumb and start to edit cell in the first topmost visible row, first column, now move the current focus by pressing keyboard combination Shift+Tab, and once again, you've hit a <a href="http://bugs.adobe.com/jira/browse/SDK-16262">SDK-16262 bug</a>.</p>
<p>To conclude this post: do not set selectable on mx:List or mx:DataGrid components to false if you are going to edit their values using itemEditors, until all above mentioned bugs will be fixed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jabbypanda.com/blog/2009/06/never-use-selectablefalse-for-editable-or/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Always keep an eye on most recent stable release of Adobe Flex SDK</title>
		<link>http://www.jabbypanda.com/blog/2008/11/always-keep-an-eye-on-most-recent-stable-release-of-adobe-flex-sdk/</link>
		<comments>http://www.jabbypanda.com/blog/2008/11/always-keep-an-eye-on-most-recent-stable-release-of-adobe-flex-sdk/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 16:43:09 +0000</pubDate>
		<dc:creator>JabbyPanda</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[UITextFormat AdobeFlex3 AdobeJIRA]]></category>

		<guid isPermaLink="false">http://www.jabbypanda.com/blog/?p=39</guid>
		<description><![CDATA[&#160;&#160;&#160;I was going to enter a new issue into Adobe JIRA Flex SDK bugbase that I could confirm to be present in the most recent milestone Adobe Flex SDK release 3.1.0.2710, shipped together with an August 2008 Flex Builder 3.0.1 update. &#160;&#160;&#160;Just before submitting the bug issue, I've tested the functionality under the question under [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;I was going to enter a new issue into <a href="https://bugs.adobe.com/jira">Adobe JIRA Flex SDK bugbase</a> that I could confirm to be present in the most recent milestone Adobe Flex SDK release 3.1.0.2710, shipped together with an August 2008 Flex Builder 3.0.1 update. </p>
<p>&nbsp;&nbsp;&nbsp;Just before submitting the bug issue, I've tested the functionality under the question <a href="http://blog.flexexamples.com/2008/08/01/downloading-and-installing-flex-sdk-builds-from-opensourceadobecom/">under the latest Adobe Flex SDK stable build</a> (<a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3">3.2.0.3794</a> at the time of writing) - and I was surprised to find out that the bug <strong>is already fixed</strong>.  Joy! Joy!</p>
<p>&nbsp;&nbsp;&nbsp; I rushed to find the reasoning for this change for UITextFormat class by reading change notes at Flex SDK download section at <a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3">Adobe open source web-site</a>, but could not find any remarks regarding this change - would be handy to have a better insight behind this change for the community.</p>
<p>&nbsp;&nbsp;&nbsp;ps If you wonder, the issue was incorrect implementation of an internal function <em>copyFrom</em> from UITextFormat class. UITextField's public getUITextFormat() method relies on this <em>copyFrom</em> function to return UITextFormat object for the UITextField class instance. In a nutshell UITextFormat object is just a wrapper around <em>textFormat</em> class that should contain all the properties from wrapped <em>textFormat</em> class instance + add some additional functionality.</p>
<p>&nbsp;&nbsp;&nbsp;As it turned out, In Adobe Flex SDK 3.1 and below, 7(!) different properties were not copied into UITextFormat object from existing <em>textFormat</em> format object because of wrong implementation of <em>UITextFormat.copyFrom</em> function.</p>
<p>&nbsp;&nbsp;&nbsp;Now, we are safe, this particular issue is fixed!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jabbypanda.com/blog/2008/11/always-keep-an-eye-on-most-recent-stable-release-of-adobe-flex-sdk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hint: Always better to use &#8216;itemUpdated&#8217; method instead of &#8216;setItemAt&#8217; when updating existing items in ArrayCollection</title>
		<link>http://www.jabbypanda.com/blog/2008/04/hint-always-better-to-use-itemupdated-method-instead-of-setitemat-when-updating-existing-items-in-arraycollection/</link>
		<comments>http://www.jabbypanda.com/blog/2008/04/hint-always-better-to-use-itemupdated-method-instead-of-setitemat-when-updating-existing-items-in-arraycollection/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 08:02:13 +0000</pubDate>
		<dc:creator>JabbyPanda</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[ArrayCollection]]></category>
		<category><![CDATA[CollectionEvent]]></category>
		<category><![CDATA[itemUpdated]]></category>
		<category><![CDATA[setItemAt]]></category>

		<guid isPermaLink="false">http://www.jabbypanda.com/blog/?p=38</guid>
		<description><![CDATA[&#160;&#160;&#160;When you want to update already existing data item in your ArrayCollection in ActionScript 3 with a new values for object's properties you have 2 options to select from: use itemUpdated(obj) ArrayCollection's method. use setItemAt(obj, index) ArrayCollection's method. &#160;&#160;&#160;ActionScript code sample: //Update an existing person in the ArrayCollection via setItemAt &#160; public function updatePersonViaSetItemAt&#40;&#41;:void &#123; [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;When you want to <u>update</u> already existing data item in your ArrayCollection in ActionScript 3 with a new values for object's properties you have 2 options to select from:
<ol type="a">
<li>
use <a href="http://livedocs.adobe.com/flex/2/langref/mx/collections/ICollectionView.html#itemUpdated()">itemUpdated(obj)</a> ArrayCollection's method.</li>
<li>
use <a href="http://livedocs.adobe.com/flex/2/langref/mx/collections/ListCollectionView.html#setItemAt()">setItemAt(obj, index)</a> ArrayCollection's method.</li>
</ol>
<p>&nbsp;&nbsp;&nbsp;ActionScript code sample:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">    <span style="color: #009900; font-style: italic;">//Update an existing person in the ArrayCollection via setItemAt</span>
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> updatePersonViaSetItemAt<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
        <span style="color: #6699cc; font-weight: bold;">var</span> currentlySelectedItem <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">Object</span> = dg<span style="color: #000066; font-weight: bold;">.</span>selectedItem<span style="color: #000066; font-weight: bold;">;</span>
        currentlySelectedItem<span style="color: #000066; font-weight: bold;">.</span>first = firstInput<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span><span style="color: #000066; font-weight: bold;">;</span>
        currentlySelectedItem<span style="color: #000066; font-weight: bold;">.</span>last = lastInput<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span><span style="color: #000066; font-weight: bold;">;</span>
        ac<span style="color: #000066; font-weight: bold;">.</span>setItemAt<span style="color: #000000;">&#40;</span>currentlySelectedItem<span style="color: #000066; font-weight: bold;">,</span> dg<span style="color: #000066; font-weight: bold;">.</span>selectedIndex<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #009900; font-style: italic;">// Update an existing person in the ArrayCollection via itemUpdated</span>
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> updatePersonViaItemUpdated<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
        <span style="color: #6699cc; font-weight: bold;">var</span> currentlySelectedItem <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #004993;">Object</span> = dg<span style="color: #000066; font-weight: bold;">.</span>selectedItem<span style="color: #000066; font-weight: bold;">;</span>
        currentlySelectedItem<span style="color: #000066; font-weight: bold;">.</span>first =  firstInput<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span><span style="color: #000066; font-weight: bold;">;</span>
        currentlySelectedItem<span style="color: #000066; font-weight: bold;">.</span>last =  lastInput<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span><span style="color: #000066; font-weight: bold;">;</span>
        ac<span style="color: #000066; font-weight: bold;">.</span>itemUpdated<span style="color: #000000;">&#40;</span>currentlySelectedItem<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #000000;">&#125;</span></pre></div></div>

<p>&nbsp;&nbsp;&nbsp;Which one to choose?</p>
<p>&nbsp;&nbsp;&nbsp;I would strongly advice to always use 'itemUpdated' because of the following reasons:</p>
<ul>
<li>Calling <em>setItemAt(x)</em> on your existing data item in ArrayCollection is an equivalent to calling the <em>removeItemAt(x)</em> method and then calling the <em>addItemAt(..., x)</em> method on your data item. <br/><br />
&nbsp;&nbsp;&nbsp;Thus after making the call to <em>setItemAt(x, index)</em> you will loose the current selection in your ArrayCollection dependant UI component (mx:DataGrid, mx:Tree, mx:Combobox.. etc..) <br/><br/>
</li>
<li>If the Sort rule is already applied to your ArrayCollection then you can receive some funky results like <a href="http://bugs.adobe.com/jira/browse/SDK-12587">unwanted inserting of a new row</a> when partly changing several properties of the existing data item in ArrayCollection.</li>
</ul>
<p>&nbsp;&nbsp;&nbsp;Interactive sample with "View source" option enabled to watch the difference:<br />
<a href="http://jabbypanda.com/labs/updateArrayCollectionItem/updateArrayCollectionItem.html">http://jabbypanda.com/labs/updateArrayCollectionItem/updateArrayCollectionItem.html</a></p>
<p>You can try the following: </p>
<ol type="1">
<li>First apply sorting to any of the DataGrid's column</li>
<li>Select the first row in the Datagrid</li>
<li>Rename the surname of the person to something completely new starting with a new letter</li>
<li>Press <strong>"Update via setItemAt()"</strong> button control </li>
</ol>
<p>Voilà, new unwanted row becomes visible in the Datagrid.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jabbypanda.com/blog/2008/04/hint-always-better-to-use-itemupdated-method-instead-of-setitemat-when-updating-existing-items-in-arraycollection/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to hide the unwanted content visible outside of mx:SWFLoader boundaries</title>
		<link>http://www.jabbypanda.com/blog/2008/02/how-to-hide-the-unwanted-content-visible-outside-of-mxswfloader-boundaries/</link>
		<comments>http://www.jabbypanda.com/blog/2008/02/how-to-hide-the-unwanted-content-visible-outside-of-mxswfloader-boundaries/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 12:28:39 +0000</pubDate>
		<dc:creator>JabbyPanda</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>

		<guid isPermaLink="false">http://www.jabbypanda.com/blog/?p=36</guid>
		<description><![CDATA[The issue: I was stumbled upon once ago when I loaded my external SWF file authored by the Flash IDE by the help of component and suddenly (?) every content object that was originally placed outside of the Stage inside the Flash IDE became visible in my Flex 2 based web application outside of the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The issue: </strong></p>
<p>I was stumbled upon once ago when I loaded my external SWF file authored by the Flash IDE by the help of <mx:SWFLoader> component and suddenly (?)  every content object that was originally placed outside of the Stage inside the Flash IDE became visible in my Flex 2 based web application outside of the <mx:SWFLoader> boundaries after loading sequence for my external SWF file was over (the file is Flash8 based, AVM1 if this matters).</p>
<p><strong>The corresponding task in Adobe JIRA bug-database:</strong><br />
<a href="http://bugs.adobe.com/jira/browse/SDK-14590">http://bugs.adobe.com/jira/browse/SDK-14590</a></p>
<p>I currently fight this issue by applying the mask over the content that is loaded by the <mx:SWFLoader> component, see the code below, may be you can find it helpful too:</p>
<p>[sourcecode language="xml"]<br />
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br />
&lt;mx:VBox xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;<br />
    resize=&quot;applyMask()&quot; &gt;</p>
<p>    &lt;mx:Script&gt;<br />
        &lt;![CDATA[<br />
            private function applyMask() : void {<br />
                if (swf != null &amp;&amp;<br />
                    swf.content != null &amp;&amp;<br />
                    swf.content.loaderInfo.width &gt; 0 &amp;&amp;<br />
                    swf.content.loaderInfo.height &gt; 0) {<br />
                    var scaleRatioX : Number = swf.content.loaderInfo.width /<br />
                                                    this.width;<br />
                    var scaleRatioY : Number = swf.content.loaderInfo.height /<br />
                                                   (this.height - this.controlBar.height);<br />
                    var scaleRatio : Number = Math.max(scaleRatioX, scaleRatioY);</p>
<p>                    swf.width = swf.content.loaderInfo.width &gt; 0 ?<br />
                          Math.round(swf.content.loaderInfo.width / scaleRatio)  : 100;<br />
                    swf.height = swf.content.loaderInfo.height &gt; 0 ?<br />
                          Math.round(swf.content.loaderInfo.height / scaleRatio) : 100;</p>
<p>                    var s : Shape = new Shape();<br />
                        s.graphics.beginFill(0xFFFFFF);<br />
                     s.graphics.drawRect(0, 0,  swf.width, swf.height);<br />
                     s.graphics.endFill();<br />
                     swf.addChild(s);<br />
                     s.visible = false;<br />
                     swf.mask = s;<br />
                }<br />
            }<br />
    ]]&gt;<br />
    &lt;/mx:Script&gt;<br />
    &lt;mx:SWFLoader id=&quot;swf&quot;<br />
        complete=&quot;applyMask()&quot;<br />
        source=&quot;navigation.swf&quot;/&gt;<br />
&lt;/mx:VBox&gt;<br />
[/sourcecode]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jabbypanda.com/blog/2008/02/how-to-hide-the-unwanted-content-visible-outside-of-mxswfloader-boundaries/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Incompatibility issue when migrating Flex SWC Library projects from Flex 2 Builder to Builder 3 Beta 2 project and back</title>
		<link>http://www.jabbypanda.com/blog/2007/10/incompatibility-issue-when-migrating-flex-swc-library-projects-from-flex-2-builder-to-builder-3-beta-2-project-and-back/</link>
		<comments>http://www.jabbypanda.com/blog/2007/10/incompatibility-issue-when-migrating-flex-swc-library-projects-from-flex-2-builder-to-builder-3-beta-2-project-and-back/#comments</comments>
		<pubDate>Wed, 17 Oct 2007 18:12:43 +0000</pubDate>
		<dc:creator>JabbyPanda</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>

		<guid isPermaLink="false">http://www.jabbypanda.com/blog/?p=35</guid>
		<description><![CDATA[The steps I underwent: I had installed Flex Builder 3 beta 2 (FB 3 beta 2) as a plugin on my Eclipse 3.2 Opened my Flex SWF Library projects inside of Flex Builder 3 beta 2 Selected Flex 3 M3 (Beta 2) SDK at the dialog (default value) Flex Buidler 2 had given me the [...]]]></description>
			<content:encoded><![CDATA[<p>The steps I underwent:</p>
<ol>
<li> I had installed Flex Builder 3 beta 2 (FB 3 beta 2) as a plugin on my Eclipse 3.2</li>
<li> Opened my Flex SWF Library projects inside of Flex Builder 3 beta 2</li>
<li> Selected Flex 3 M3 (Beta 2) SDK at the dialog (default value)</li>
<li> Flex Buidler 2  had given me the following error in my log file: (full error info skipped for the sake of text clarity)</li>
<p><font size="1"><em>java.lang.IllegalArgumentException: Attempted to beginRule: P/FlexLibrary, does not match outer scope rule: P/as3corelib<br />
at com.adobe.flexbuilder.project.actionscript.internal.FlexProjectPreferences.setUpgradeFlexSDK<br />
(FlexProjectPreferences.java:147)<br />
at com.adobe.flexbuilder.project.actionscript.internal.ActionScriptProjectSettings$2.runInUIThread<br />
(ActionScriptProjectSettings.java:285) </em></font></p>
<li> <strong><u>Nevertheless of the received error, I was able to compile ALL my Flex 2 based projects that relies on my Flex SWC Library projects in FB 3 Beta 2</u></strong></li>
<li> Then I had reopened my plain Flex projects inside Flex Builder 2 again, because at the company we are using currently Flex Builder 2 for the production.</li>
<li> But Flex Builder 2 constantly had <strong><font color="red">failed</font></strong> to recompile all Flex SWC Library projects that were previously opened at least once at FB 3 beta2.</li>
</ol>
<p> My resolution to this issue was to delete manually a config file created by FB 3 beta 2 and located at each Flex SWC library project folder at the following path: </p>
<p><code>c:\workspace\<Flex 2 Library SWC project name>\.settings\com.adobe.flexbuilder.project.prefs </code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jabbypanda.com/blog/2007/10/incompatibility-issue-when-migrating-flex-swc-library-projects-from-flex-2-builder-to-builder-3-beta-2-project-and-back/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How big is your Flex?</title>
		<link>http://www.jabbypanda.com/blog/2007/10/how-big-is-your-flex/</link>
		<comments>http://www.jabbypanda.com/blog/2007/10/how-big-is-your-flex/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 15:09:46 +0000</pubDate>
		<dc:creator>JabbyPanda</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>

		<guid isPermaLink="false">http://www.jabbypanda.com/blog/?p=33</guid>
		<description><![CDATA[Mine Flex 2 authored SWF is 19 levels deep in its full glory: [sourcecode language="actionScript3"]_level0.index0.VBox5.GradientBox25.indexViewStack. mainPage.contentPane.mainViewStack.customerViewStack. presentationViewer.swf.FlexLoader396.instance458.sfiViewer. bank.foreground.sa04d14eaa39b3fd.content.clip[/sourcecode]]]></description>
			<content:encoded><![CDATA[<p>Mine Flex 2 authored SWF is 19 levels deep in its full glory: </p>
<p>[sourcecode language="actionScript3"]_level0.index0.VBox5.GradientBox25.indexViewStack.<br />
mainPage.contentPane.mainViewStack.customerViewStack.<br />
presentationViewer.swf.FlexLoader396.instance458.sfiViewer.<br />
bank.foreground.sa04d14eaa39b3fd.content.clip[/sourcecode]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jabbypanda.com/blog/2007/10/how-big-is-your-flex/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Hyperlink component for Flex 2 ver 0.1</title>
		<link>http://www.jabbypanda.com/blog/2007/06/hyperlink-component-for-flex-2-ver-01/</link>
		<comments>http://www.jabbypanda.com/blog/2007/06/hyperlink-component-for-flex-2-ver-01/#comments</comments>
		<pubDate>Wed, 06 Jun 2007 09:47:33 +0000</pubDate>
		<dc:creator>JabbyPanda</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>

		<guid isPermaLink="false">http://www.jabbypanda.com/blog/?p=28</guid>
		<description><![CDATA[&#160;&#160;&#160; Sometimes the look of &#60;mx:LinkButton&#62; look is not enough to satisfy the designer's requirement to display hyperlinks inside you Flex 2 application in a way we got used to see them in HTML world, e.g. to display hyperlinks inside Flex 2 in a plain text. Luckily Flash 9 supports pseudo CSS style selectors like [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp; Sometimes the look of &lt;mx:LinkButton&gt; look is not enough to satisfy the designer's requirement to display hyperlinks inside you Flex 2 application in a way we got used to see them in HTML world, e.g. <strong>to display hyperlinks inside Flex 2 in a plain text</strong>. </p>
<p>Luckily Flash 9 supports pseudo CSS style selectors like<em> a:hover</em>, <em>a:link</em>, <em>a:active</em>. Let's use this fact to our advantage! </p>
<p>Source MXML code of the example project:</p>

<div class="wp_syntax"><table><tr><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
44
45
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&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:Application</span></span>
<span style="color: #009900;">    <span style="color: #000066;">xmlns:mx</span>=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">layout</span>=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">xmlns:text</span>=<span style="color: #ff0000;">&quot;jabbypanda.controls.*&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;100%&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">horizontalAlign</span>=<span style="color: #ff0000;">&quot;center&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">backgroundGradientColors</span>=<span style="color: #ff0000;">&quot;[#000000, #282828]&quot;</span> <span style="color: #000066;">backgroundColor</span>=<span style="color: #ff0000;">&quot;#282828&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">verticalAlign</span>=<span style="color: #ff0000;">&quot;middle&quot;</span> <span style="color: #000066;">viewSourceURL</span>=<span style="color: #ff0000;">&quot;srcview/index.html&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:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     <span style="color: #339933;">&lt;![CDATA[</span>
<span style="color: #339933;">         import jabbypanda.controls.HyperLink;</span>
<span style="color: #339933;">         import jabbypanda.controls.events.HyperlinkEvent;</span>
&nbsp;
<span style="color: #339933;">        private function onLinkClick(evt : HyperlinkEvent) : void {</span>
<span style="color: #339933;">            // here you can invoke loading of external web-page if you want    via URLRequest</span>
<span style="color: #339933;">             var hControl : HyperLink = HyperLink(evt.target);</span>
<span style="color: #339933;">            txtDataUrl.text = &quot;You just had clicked '&quot; + hControl.linkText + &quot;'&quot;;</span>
<span style="color: #339933;">            txtDataUrl.visible = true;</span>
<span style="color: #339933;">          }</span>
&nbsp;
<span style="color: #339933;">          private function changeStyle() : void {</span>
<span style="color: #339933;">              hLink.setStyle(&quot;colorLink&quot;, 0xFFFF00);</span>
<span style="color: #339933;">              hLink.setStyle(&quot;colorHover&quot;, 0xFFFF00);</span>
<span style="color: #339933;">              txtDataUrl.visible = false;</span>
<span style="color: #339933;">          }</span>
<span style="color: #339933;">     ]]&gt;</span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     HyperLink {
         colorLink : #FF0000;
         colorHover : #00FF00;
         colorActive : #0000FF;
     }
&nbsp;
     Label {
         color : #CCCCCC;
         fontSize : 16;
     }
&nbsp;
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mx:Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;text:HyperLink</span> <span style="color: #000066;">linkText</span>=<span style="color: #ff0000;">&quot;Click me! I am a hypertext link&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;hLink&quot;</span> <span style="color: #000066;">linkClick</span>=<span style="color: #ff0000;">&quot;onLinkClick(event)&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:Button</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;btn&quot;</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;Change the style&quot;</span> <span style="color: #000066;">click</span>=<span style="color: #ff0000;">&quot;changeStyle()&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:Label</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;txtDataUrl&quot;</span> <span style="color: #000066;">visible</span>=<span style="color: #ff0000;">&quot;false&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:Application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>See the demo below. </p>
<p>Example: <a href="http://jabbypanda.com/labs/hyperLink/htmlText.html ">http://jabbypanda.com/labs/hyperLink/htmlText.html </a><br />
Source files:<a href=" http://jabbypanda.com/labs/hyperLink/srcview/index.html "> http://jabbypanda.com/labs/hyperLink/srcview/index.html </a></p>
<p>ps<br />
I marked this component version as 0.1 because I feel there is a open room for suggestion how to correct/ extend Hyperlink component to make it more useful.</p>
<p>Tell me frankly, does this hyperlink component look good enough to match a view and feel of plain old &lt;a href&gt; tag from HTML world?</p>
<p>Acknowledgments</p>
<p><a href="http://www.cflex.net/showFileDetails.cfm?ObjectID=595&#038;ChannelID=1">Hyperlink component </a> example written by Tracy Spratt</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jabbypanda.com/blog/2007/06/hyperlink-component-for-flex-2-ver-01/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

