<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Building a simple tip calculator in Flex</title>
	<link>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Fri, 05 Dec 2008 11:18:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-6094</link>
		<author>peterd</author>
		<pubDate>Tue, 15 Jan 2008 00:16:57 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-6094</guid>
		<description>Varun Shetty,

No real reason, mainly just a force of habit. You can change:
&lt;pre class="code"&gt;
focusIn="amount_focusIn(event);"
&lt;/pre&gt;

to:
&lt;pre class="code"&gt;
focusIn="amount_focusIn();"
&lt;/pre&gt;

And then update the ActionScript code to:
&lt;pre class="code"&gt;
private function amount_focusIn():void {
    amount.text = amount.data.toString();
}
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>Varun Shetty,</p>
<p>No real reason, mainly just a force of habit. You can change:</p>
<pre class="code">
focusIn="amount_focusIn(event);"
</pre>
<p>to:</p>
<pre class="code">
focusIn="amount_focusIn();"
</pre>
<p>And then update the ActionScript code to:</p>
<pre class="code">
private function amount_focusIn():void {
    amount.text = amount.data.toString();
}
</pre>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Varun Shetty</title>
		<link>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-6086</link>
		<author>Varun Shetty</author>
		<pubDate>Mon, 14 Jan 2008 18:30:42 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-6086</guid>
		<description>first of all, I would really like to thank you for all the examples and code tutorials given on this site. it is really helpful. thank you very much for all the efforts you have put into this, really appreciate it. 

i had a simple question, why do you send 'event' as a param for 'amount_focusOut' and 'amount_focusIn'. I don't see the param being used within the function.</description>
		<content:encoded><![CDATA[<p>first of all, I would really like to thank you for all the examples and code tutorials given on this site. it is really helpful. thank you very much for all the efforts you have put into this, really appreciate it. </p>
<p>i had a simple question, why do you send &#8216;event&#8217; as a param for &#8216;amount_focusOut&#8217; and &#8216;amount_focusIn&#8217;. I don&#8217;t see the param being used within the function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haleh</title>
		<link>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-5573</link>
		<author>Haleh</author>
		<pubDate>Thu, 27 Dec 2007 22:57:49 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-5573</guid>
		<description>I am noticing that clicking on the slider track does not register as a focusOut event for the TextInput (when the text input has focus). Only clicking on the slider thumb or dragging the thumb causes this event to occur. Is there a way to force the text input to recognize a track click as a focusOut? I am having the same problem in an application I am working on, so any help is appreciated!

Thanks</description>
		<content:encoded><![CDATA[<p>I am noticing that clicking on the slider track does not register as a focusOut event for the TextInput (when the text input has focus). Only clicking on the slider thumb or dragging the thumb causes this event to occur. Is there a way to force the text input to recognize a track click as a focusOut? I am having the same problem in an application I am working on, so any help is appreciated!</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gareth</title>
		<link>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-2494</link>
		<author>Gareth</author>
		<pubDate>Tue, 18 Sep 2007 19:04:58 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-2494</guid>
		<description>I actually just added this code right above the amt variable declaration

&lt;pre class="code"&gt;
if (!isNaN(Number(amount.text))) amount.data = amount.text;
&lt;/pre&gt;

This updates the data variable to whatever the text field contains, as long as it contains a number.</description>
		<content:encoded><![CDATA[<p>I actually just added this code right above the amt variable declaration</p>
<pre class="code">
if (!isNaN(Number(amount.text))) amount.data = amount.text;
</pre>
<p>This updates the data variable to whatever the text field contains, as long as it contains a number.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce</title>
		<link>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-2482</link>
		<author>Bruce</author>
		<pubDate>Tue, 18 Sep 2007 16:56:51 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-2482</guid>
		<description>Peter - The first time you load the example and enter an amount the total reads $0.00 before you move the slider control. You have to move the slider to get the new total, even though your TextInput control is calling updateTotal on its change event.

I tried using the TextInput control's textInput event but that crashed my FireFox browser.  The other TextInput events did not seem to work with.  The enter event reads 0 the first time and then the next time uses the previous amount to calculate the tip.</description>
		<content:encoded><![CDATA[<p>Peter - The first time you load the example and enter an amount the total reads $0.00 before you move the slider control. You have to move the slider to get the new total, even though your TextInput control is calling updateTotal on its change event.</p>
<p>I tried using the TextInput control&#8217;s textInput event but that crashed my FireFox browser.  The other TextInput events did not seem to work with.  The enter event reads 0 the first time and then the next time uses the previous amount to calculate the tip.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-2473</link>
		<author>peterd</author>
		<pubDate>Tue, 18 Sep 2007 16:12:55 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-2473</guid>
		<description>Fear not, devoted readers. The example SWFs will be coming back, I've just been too busy the last few days to recreate, upload and them in the HTML.
I'll try and find some time tonight and go back and add them in.

Sorry, and thanks for keeping me on my toes!

BFF,
Peter</description>
		<content:encoded><![CDATA[<p>Fear not, devoted readers. The example SWFs will be coming back, I&#8217;ve just been too busy the last few days to recreate, upload and them in the HTML.<br />
I&#8217;ll try and find some time tonight and go back and add them in.</p>
<p>Sorry, and thanks for keeping me on my toes!</p>
<p>BFF,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: simon</title>
		<link>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-2468</link>
		<author>simon</author>
		<pubDate>Tue, 18 Sep 2007 13:39:44 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-2468</guid>
		<description>yes, i miss the running applications too. BTW, your website is my new #1 flex resource.</description>
		<content:encoded><![CDATA[<p>yes, i miss the running applications too. BTW, your website is my new #1 flex resource.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George</title>
		<link>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-2442</link>
		<author>George</author>
		<pubDate>Tue, 18 Sep 2007 08:57:14 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/09/17/building-a-simple-tip-calculator-in-flex/#comment-2442</guid>
		<description>Will you be adding the running application to the end of your examples again soon? Keep up the good work.</description>
		<content:encoded><![CDATA[<p>Will you be adding the running application to the end of your examples again soon? Keep up the good work.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
