Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-08-01 Thread Tom Chiverton
On Thursday 31 Jul 2008, Sid Maskit wrote: mx:Label id=display text={(isNaN(myNumber as Number)) ? 0 : PrepForDisplay.format(myNumber)} Eww. That is so hard to read. Either use a labelFunction or just fix PrepForDisplay.format(). -- Tom Chiverton

Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-08-01 Thread Sid Maskit
] To: flexcoders@yahoogroups.com Sent: Friday, August 1, 2008 5:04:56 AM Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify? On Thursday 31 Jul 2008, Sid Maskit wrote: mx:Label id=display text={(isNaN(myNumber as Number)) ? 0 : PrepForDisplay.format(myNumber)} Eww. That is so hard

RE: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-08-01 Thread Gordon Smith
Maskit Sent: Friday, August 01, 2008 2:54 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify? Eww, eh? Well, gee, Tom, I hope I didn't spoil your breakfast or anything ;) I think both your refactorings are good ones. I was definitely

Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Sid Maskit
If the format function is a custom function you have written, you could just have it check whether you like the result it is about to return, and if not, return something else. If that is not the case, I believe that you should be able to put tests into your binding statement. You could test

Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Blair Cox
Maskit [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT) To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify? If the format function is a custom function you have written, you could just

Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Blair Cox
(PDT) To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify? If the format function is a custom function you have written, you could just have it check whether you like the result it is about to return, and if not, return something else

Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Blair Cox
: -- Blair Cox http://www.luminultra.com From: Sid Maskit [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT) To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify? If the format

Re: [flexcoders] NaN to return a string?

2008-07-31 Thread Blair Cox
] Reply-To: flexcoders@yahoogroups.com Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT) To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify? If the format function is a custom function you have written, you could just have it check whether you

Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Laurent Cozic
How about: sNaN(mynumber) ? 0 : -- Laurent Cozic Flash, Flex and Web Application development http://pogopixels.com - Original Message From: Blair Cox [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, July 31, 2008 5:19:46 PM Subject: Re: [flexcoders] NaN

Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Sid Maskit
, 2008 9:19:46 AM Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify? Just one more question. The zero works for me, but I’m sure I’ll be asked to make it blank. Any hints as to how this could be accomplished? Coming from the Flash side of things, all I would be looking

Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Sid Maskit
:19 AM Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify? Try something like this: mx:Label id=display text={(isNaN( myNumber as Number)) ? 0 : PrepForDisplay. format(myNumber) } visible={display. text != '0' amp;amp; display.text != 'In,fin,ity. 00'}/ Note that you

Re: [flexcoders] NaN to return a string?

2008-07-31 Thread Sid Maskit
for a Better World http://www.CraftySpace.com blog: http://smaskit.blogspot.com/ - Original Message From: Blair Cox [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, July 31, 2008 9:27:02 AM Subject: Re: [flexcoders] NaN to return a string? Turns out showing a zero

Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Blair Cox
Cozic [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com Date: Thu, 31 Jul 2008 09:28:51 -0700 (PDT) To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify? How about: sNaN(mynumber) ? 0 : -- Laurent Cozic Flash, Flex and Web

Re: [flexcoders] NaN to return a string?

2008-07-31 Thread Blair Cox
-To: flexcoders@yahoogroups.com Date: Thu, 31 Jul 2008 09:43:06 -0700 (PDT) To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] NaN to return a string? Sure, just replace the 0 with whatever text you want, putting it inside single quotes since the entire statement is inside of double quotes. Since you

Re: [flexcoders] NaN

2005-08-02 Thread Manish Jethani
On 8/2/05, Ghislain Simard [EMAIL PROTECTED] wrote: The following condition doesn't see the NaN...why ? and how to make the condition working? if (myField == NaN){ dosomething; } Use this: if (isNaN(myField)) ... There's some interesting things about NaN. See this post, for

RE: [flexcoders] NaN

2005-08-02 Thread Simard, Ghislain
of Canada [EMAIL PROTECTED] 613-947-0582 | télécopieur / facsimile 613-996-9416 -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Manish Jethani Sent: Tuesday, August 02, 2005 2:42 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] NaN On 8

RE: [flexcoders] NaN

2005-08-02 Thread Geoffrey Williams
if (myField == undefined) { //... } -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Simard, Ghislain Sent: Tuesday, August 02, 2005 2:47 PM To: 'flexcoders@yahoogroups.com' Subject: RE: [flexcoders] NaN Is there an equivalent for undefined

RE: [flexcoders] NaN Undefined

2005-08-02 Thread Simard, Ghislain
-0582 | télécopieur / facsimile 613-996-9416 -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Geoffrey Williams Sent: Tuesday, August 02, 2005 3:03 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] NaN if (myField == undefined

Re: [flexcoders] NaN Undefined

2005-08-02 Thread Aldo Bucchi
: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Geoffrey Williams Sent: Tuesday, August 02, 2005 3:03 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] NaN if (myField == undefined) { //... } -Original Message- From: flexcoders@yahoogroups.com [mailto