<?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: FormattedStepper extends NumericStepper</title>
	<atom:link href="http://blog.tsclausing.com/post/22/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.tsclausing.com/post/22</link>
	<description>Personal &#38; Professional Blog of T. Scot Clausing // Adobe Flex Consultant in Nashville, TN</description>
	<pubDate>Wed, 10 Mar 2010 07:26:19 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: T. Scot Clausing</title>
		<link>http://blog.tsclausing.com/post/22#comment-450</link>
		<dc:creator>T. Scot Clausing</dc:creator>
		<pubDate>Thu, 06 Aug 2009 14:07:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/22#comment-450</guid>
		<description>Hi Tatini

That's right.  Clicking in the text input of the stepper component will show the raw, un-formatted value.  You'll notice the same behavior on the currency formatter.  This is the expected behavior.</description>
		<content:encoded><![CDATA[<p>Hi Tatini</p>
<p>That&#8217;s right.  Clicking in the text input of the stepper component will show the raw, un-formatted value.  You&#8217;ll notice the same behavior on the currency formatter.  This is the expected behavior.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tatini</title>
		<link>http://blog.tsclausing.com/post/22#comment-449</link>
		<dc:creator>Tatini</dc:creator>
		<pubDate>Thu, 06 Aug 2009 09:22:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/22#comment-449</guid>
		<description>after clicking on the hour minute field its showing the long value formatted value is going off...</description>
		<content:encoded><![CDATA[<p>after clicking on the hour minute field its showing the long value formatted value is going off&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://blog.tsclausing.com/post/22#comment-416</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Thu, 16 Jul 2009 19:12:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/22#comment-416</guid>
		<description>Hey good stuff! 

One thing I have noticed with this kind of method is if a maximum value has been set on the stepper and you keep mouse down on the nextButton then the value will display un-formatted :(

The way to overcome this is as equally simple as your tasty example and that is to run the doFormat() method on BUTTON_DOWN.

Cheers,

Simon</description>
		<content:encoded><![CDATA[<p>Hey good stuff! </p>
<p>One thing I have noticed with this kind of method is if a maximum value has been set on the stepper and you keep mouse down on the nextButton then the value will display un-formatted <img src='http://blog.tsclausing.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
The way to overcome this is as equally simple as your tasty example and that is to run the doFormat() method on BUTTON_DOWN.</p>
<p>Cheers,</p>
<p>Simon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todd</title>
		<link>http://blog.tsclausing.com/post/22#comment-142</link>
		<dc:creator>Todd</dc:creator>
		<pubDate>Thu, 24 Apr 2008 20:18:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/22#comment-142</guid>
		<description>OK, I figured out at least a work around for the problem in trying to add a FormattedStepper in an ActionScript class. I'm not sure of the difference between MXML declaration and AS construction that causes it, but if you change the functions as follows it will compile and render properly:

        private function doFormat(event:Event = null):void {
            if (_formatter != null
            	&#38;&#38; mx_internal::inputField != null
            	&#38;&#38; mx_internal::inputField.text != null)
            	{
            		mx_internal::inputField.text = _formatter.format(value);
            	} 
        }
        
        private function unFormat(event:Event = null):void {
            if (_formatter != null
            	&#38;&#38; mx_internal::inputField != null
            	&#38;&#38; mx_internal::inputField.text != null)
            	{
            		mx_internal::inputField.text = String(value);
            	} 
        }


Another odd behavior that I observed was that if you declare a Formatter in a VBox I couldn't get the MXML component to compile, but if it was within an HBox it would.</description>
		<content:encoded><![CDATA[<p>OK, I figured out at least a work around for the problem in trying to add a FormattedStepper in an ActionScript class. I&#8217;m not sure of the difference between MXML declaration and AS construction that causes it, but if you change the functions as follows it will compile and render properly:</p>
<p>        private function doFormat(event:Event = null):void {<br />
            if (_formatter != null<br />
            	&amp;&amp; mx_internal::inputField != null<br />
            	&amp;&amp; mx_internal::inputField.text != null)<br />
            	{<br />
            		mx_internal::inputField.text = _formatter.format(value);<br />
            	}<br />
        }</p>
<p>        private function unFormat(event:Event = null):void {<br />
            if (_formatter != null<br />
            	&amp;&amp; mx_internal::inputField != null<br />
            	&amp;&amp; mx_internal::inputField.text != null)<br />
            	{<br />
            		mx_internal::inputField.text = String(value);<br />
            	}<br />
        }</p>
<p>Another odd behavior that I observed was that if you declare a Formatter in a VBox I couldn&#8217;t get the MXML component to compile, but if it was within an HBox it would.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: T. Scot Clausing</title>
		<link>http://blog.tsclausing.com/post/22#comment-141</link>
		<dc:creator>T. Scot Clausing</dc:creator>
		<pubDate>Wed, 23 Apr 2008 18:48:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/22#comment-141</guid>
		<description>Glad to hear it's handy.  I never tested the component the way you're describing it being used - so hopefully you'll come up with a good solution and let me know about it!  Thanks.</description>
		<content:encoded><![CDATA[<p>Glad to hear it&#8217;s handy.  I never tested the component the way you&#8217;re describing it being used - so hopefully you&#8217;ll come up with a good solution and let me know about it!  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todd</title>
		<link>http://blog.tsclausing.com/post/22#comment-136</link>
		<dc:creator>Todd</dc:creator>
		<pubDate>Mon, 21 Apr 2008 19:48:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/22#comment-136</guid>
		<description>I am having a problem when trying to instantiate a FormattedStepper in an ActionScript class. I get an exception because mx_internal::inputField is null so the mx_internal::inputField.text assignment in doFormat fails.

Otherwise, great component and very handy functionality. Thanks Scot!</description>
		<content:encoded><![CDATA[<p>I am having a problem when trying to instantiate a FormattedStepper in an ActionScript class. I get an exception because mx_internal::inputField is null so the mx_internal::inputField.text assignment in doFormat fails.</p>
<p>Otherwise, great component and very handy functionality. Thanks Scot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gif</title>
		<link>http://blog.tsclausing.com/post/22#comment-29</link>
		<dc:creator>gif</dc:creator>
		<pubDate>Mon, 18 Feb 2008 16:25:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/22#comment-29</guid>
		<description>wow:) great, thanks again, your example helped me a lot.
i needed a time formatter (like 00:00:12.345 -from 12.345 as cell value), and it works well as a standalone editor, but in a datagrid.. i spent hours with that issue, but couldn't find a way to get that stepper.value trick:)
thanks for the quick response.</description>
		<content:encoded><![CDATA[<p>wow:) great, thanks again, your example helped me a lot.<br />
i needed a time formatter (like 00:00:12.345 -from 12.345 as cell value), and it works well as a standalone editor, but in a datagrid.. i spent hours with that issue, but couldn&#8217;t find a way to get that stepper.value trick:)<br />
thanks for the quick response.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: T. Scot Clausing</title>
		<link>http://blog.tsclausing.com/post/22#comment-28</link>
		<dc:creator>T. Scot Clausing</dc:creator>
		<pubDate>Mon, 18 Feb 2008 15:28:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/22#comment-28</guid>
		<description>gif - Thanks for suggesting an example using an item editor.  I have updated the example to use an item editor / renderer in the Data Grid.  For a good resource on getting started with item editors, take a look at:
http://www.adobe.com/devnet/flex/quickstart/creating_item_editors/</description>
		<content:encoded><![CDATA[<p>gif - Thanks for suggesting an example using an item editor.  I have updated the example to use an item editor / renderer in the Data Grid.  For a good resource on getting started with item editors, take a look at:<br />
<a href="http://www.adobe.com/devnet/flex/quickstart/creating_item_editors/" rel="nofollow">http://www.adobe.com/devnet/flex/quickstart/creating_item_editors/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gif</title>
		<link>http://blog.tsclausing.com/post/22#comment-27</link>
		<dc:creator>gif</dc:creator>
		<pubDate>Sun, 17 Feb 2008 23:44:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/22#comment-27</guid>
		<description>it would be nice to have an itemEditor version of the formattedCurrencyStepperRenderer component, but great work anyways:)</description>
		<content:encoded><![CDATA[<p>it would be nice to have an itemEditor version of the formattedCurrencyStepperRenderer component, but great work anyways:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harish</title>
		<link>http://blog.tsclausing.com/post/22#comment-15</link>
		<dc:creator>Harish</dc:creator>
		<pubDate>Fri, 01 Feb 2008 08:53:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/22#comment-15</guid>
		<description>great work here, Thanks to Flex 3 making the listeners of buttons mx_internal. Else, we might have had to re-write the listener code into the class itself.</description>
		<content:encoded><![CDATA[<p>great work here, Thanks to Flex 3 making the listeners of buttons mx_internal. Else, we might have had to re-write the listener code into the class itself.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
