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
]
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
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
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
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
(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
:
--
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
]
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
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
, 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
: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
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
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
-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
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
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
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
-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
: 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
19 matches
Mail list logo