<?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"
	>
<channel>
	<title>Comments on: Customize the Spark TextInput Component in Flex 4 (Gumbo). Adding focus and Transitions.</title>
	<atom:link href="http://www.hulstkamp.com/2009/06/01/customize-the-spark-textinput-component-in-flex-4-gumbo-adding-focus-and-transitions/344/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hulstkamp.com/2009/06/01/customize-the-spark-textinput-component-in-flex-4-gumbo-adding-focus-and-transitions/344</link>
	<description>andy hulstkamp blog about rich internet applications, flex, flash, java, webapps, web, code, experiments</description>
	<pubDate>Thu, 29 Jul 2010 16:03:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Andy Hulstkamp</title>
		<link>http://www.hulstkamp.com/2009/06/01/customize-the-spark-textinput-component-in-flex-4-gumbo-adding-focus-and-transitions/344#comment-232</link>
		<dc:creator>Andy Hulstkamp</dc:creator>
		<pubDate>Fri, 18 Jun 2010 08:50:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.hulstkamp.com/?p=344#comment-232</guid>
		<description>Chris,

This example uses some beta version of the Flex 4 sdk. Some stuff has changed in the final release of F4 sdk, so you might need to adjust the source here and there.

However, &lt;i&gt;'ArgumentError: Undefined state ‘focused’&lt;/i&gt; sounds like the component tries to put the skin into 'focused' state, but 'focused' state has not been declared in the skin.

Also check some components &lt;a href="http://www.hulstkamp.com/2010/05/08/updated-components-to-flex-4-sdk-final/506" rel="nofollow"&gt;here&lt;/a&gt; that have been updated to F4 final.</description>
		<content:encoded><![CDATA[<p>Chris,</p>
<p>This example uses some beta version of the Flex 4 sdk. Some stuff has changed in the final release of F4 sdk, so you might need to adjust the source here and there.</p>
<p>However, <i>&#8216;ArgumentError: Undefined state ‘focused’</i> sounds like the component tries to put the skin into &#8216;focused&#8217; state, but &#8216;focused&#8217; state has not been declared in the skin.</p>
<p>Also check some components <a href="http://www.hulstkamp.com/2010/05/08/updated-components-to-flex-4-sdk-final/506" rel="nofollow">here</a> that have been updated to F4 final.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.hulstkamp.com/2009/06/01/customize-the-spark-textinput-component-in-flex-4-gumbo-adding-focus-and-transitions/344#comment-227</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Thu, 17 Jun 2010 17:09:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.hulstkamp.com/?p=344#comment-227</guid>
		<description>This is a great solution that I would like to use, however I keep getting the following error: ArgumentError: Undefined state 'focused' I would really appreciate any assistance. Thx.</description>
		<content:encoded><![CDATA[<p>This is a great solution that I would like to use, however I keep getting the following error: ArgumentError: Undefined state &#8216;focused&#8217; I would really appreciate any assistance. Thx.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Hulstkamp</title>
		<link>http://www.hulstkamp.com/2009/06/01/customize-the-spark-textinput-component-in-flex-4-gumbo-adding-focus-and-transitions/344#comment-157</link>
		<dc:creator>Andy Hulstkamp</dc:creator>
		<pubDate>Tue, 02 Mar 2010 16:56:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.hulstkamp.com/?p=344#comment-157</guid>
		<description>Roman,

Thanks for your contribution.</description>
		<content:encoded><![CDATA[<p>Roman,</p>
<p>Thanks for your contribution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roman Shumikhin</title>
		<link>http://www.hulstkamp.com/2009/06/01/customize-the-spark-textinput-component-in-flex-4-gumbo-adding-focus-and-transitions/344#comment-155</link>
		<dc:creator>Roman Shumikhin</dc:creator>
		<pubDate>Sun, 21 Feb 2010 13:38:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.hulstkamp.com/?p=344#comment-155</guid>
		<description>Andy,

Thank very much for the code!
Everything works great, but when the text begins to overflow, the control wraps its text inside (which looks ugly).
I recommend you to modify your partAdded method like this:

//Add Event-Listeners to the textview for FocusEvent
override protected function partAdded(partName:String, instance:Object):void {
	super.partAdded(partName, instance);
	if (instance == this.textView) {
		trace ("Adding TextView");
		this.textView.addEventListener(FocusEvent.FOCUS_IN, onFocusInHandler);
		this.textView.addEventListener(FocusEvent.FOCUS_OUT, onFocusOutHandler);

		// Prevent multiline
		textDisplay.multiline = false;		
		// Single line for interactive input.  Multi-line text can be set.
		textDisplay.setStyle("lineBreak", "explicit");		
		// TextInput should always be 1 line.
		textDisplay.heightInLines = 1;
	}
}

I added 3 lines from the FlexSDK source code of TextInput class.

Thanks again!

Roman</description>
		<content:encoded><![CDATA[<p>Andy,</p>
<p>Thank very much for the code!<br />
Everything works great, but when the text begins to overflow, the control wraps its text inside (which looks ugly).<br />
I recommend you to modify your partAdded method like this:</p>
<p>//Add Event-Listeners to the textview for FocusEvent<br />
override protected function partAdded(partName:String, instance:Object):void {<br />
	super.partAdded(partName, instance);<br />
	if (instance == this.textView) {<br />
		trace (&#8221;Adding TextView&#8221;);<br />
		this.textView.addEventListener(FocusEvent.FOCUS_IN, onFocusInHandler);<br />
		this.textView.addEventListener(FocusEvent.FOCUS_OUT, onFocusOutHandler);</p>
<p>		// Prevent multiline<br />
		textDisplay.multiline = false;<br />
		// Single line for interactive input.  Multi-line text can be set.<br />
		textDisplay.setStyle(&#8221;lineBreak&#8221;, &#8220;explicit&#8221;);<br />
		// TextInput should always be 1 line.<br />
		textDisplay.heightInLines = 1;<br />
	}<br />
}</p>
<p>I added 3 lines from the FlexSDK source code of TextInput class.</p>
<p>Thanks again!</p>
<p>Roman</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prasad</title>
		<link>http://www.hulstkamp.com/2009/06/01/customize-the-spark-textinput-component-in-flex-4-gumbo-adding-focus-and-transitions/344#comment-141</link>
		<dc:creator>prasad</dc:creator>
		<pubDate>Mon, 07 Dec 2009 12:51:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.hulstkamp.com/?p=344#comment-141</guid>
		<description>Good work in Flex textInput control.

Thanks for the useful code.</description>
		<content:encoded><![CDATA[<p>Good work in Flex textInput control.</p>
<p>Thanks for the useful code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lior</title>
		<link>http://www.hulstkamp.com/2009/06/01/customize-the-spark-textinput-component-in-flex-4-gumbo-adding-focus-and-transitions/344#comment-103</link>
		<dc:creator>Lior</dc:creator>
		<pubDate>Fri, 14 Aug 2009 13:51:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.hulstkamp.com/?p=344#comment-103</guid>
		<description>working great! 

thanks a lot :-)</description>
		<content:encoded><![CDATA[<p>working great! </p>
<p>thanks a lot <img src='http://www.hulstkamp.com/soil/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Hulstkamp</title>
		<link>http://www.hulstkamp.com/2009/06/01/customize-the-spark-textinput-component-in-flex-4-gumbo-adding-focus-and-transitions/344#comment-102</link>
		<dc:creator>Andy Hulstkamp</dc:creator>
		<pubDate>Fri, 14 Aug 2009 13:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.hulstkamp.com/?p=344#comment-102</guid>
		<description>Lior,

Seems there's been some renaming in the Flex SDK again.
Try using textDisplay in place of textView. Do this in the skin also, so that the skinPart is found.

hth
andy</description>
		<content:encoded><![CDATA[<p>Lior,</p>
<p>Seems there&#8217;s been some renaming in the Flex SDK again.<br />
Try using textDisplay in place of textView. Do this in the skin also, so that the skinPart is found.</p>
<p>hth<br />
andy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lior</title>
		<link>http://www.hulstkamp.com/2009/06/01/customize-the-spark-textinput-component-in-flex-4-gumbo-adding-focus-and-transitions/344#comment-101</link>
		<dc:creator>Lior</dc:creator>
		<pubDate>Fri, 14 Aug 2009 12:52:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.hulstkamp.com/?p=344#comment-101</guid>
		<description>Hi There,

I'm trying your component (on flex 4.0.0.9237) and get this error message: 
'1119: Access of possibly undefined property textView through a reference with static type AHTextInput.	AHTextInput.as	TestWeb/src	line 29	Flex Problem'

can you help me with this?</description>
		<content:encoded><![CDATA[<p>Hi There,</p>
<p>I&#8217;m trying your component (on flex 4.0.0.9237) and get this error message:<br />
&#8216;1119: Access of possibly undefined property textView through a reference with static type AHTextInput.	AHTextInput.as	TestWeb/src	line 29	Flex Problem&#8217;</p>
<p>can you help me with this?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
