 |
|
 |
 |
|
 |
 |
| Author |
Message |
|
|
|
Post subject: JavaScript: A dot following a number *is* decimal point!
Posted: Nov 15, 2006 - 10:19 PM
|
|
Veteran Member


Joined: Nov 11, 2004
Posts: 5
|
|
Is there any way to disable the bogus JavaScript warning "A dot following a number can be confused with a decimal point"?
| Code: |
var dialog = new YAHOO.widget.SimpleDialog("internalError", {
**** effect: {effect:YAHOO.widget.ContainerEffect.FADE, duration: 0.25},
fixedcenter:true,
modal:true,
draggable:false
});
|
(The flagged line is marked with ****).
Version: 5.1.0 GA
Build id: 20061111-5.1.0-GA
Thanks. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Nov 16, 2006 - 04:49 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23855
|
|
MrFeinberg,
I believe it just wants you to quote the value, that will make it happy. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Nov 16, 2006 - 05:11 PM
|
|
Veteran Member


Joined: Nov 11, 2004
Posts: 5
|
|
| support-rkalla wrote: | | I believe it just wants you to quote the value, that will make it happy. |
Why would I want to quote a numeric literal? The ECMAScript spec says that an object literal is
| Code: | ObjectLiteral :
{}
{ PropertyNameAndValueList }
PropertyNameAndValueList :
PropertyName : AssignmentExpression
PropertyNameAndValueList , PropertyName : AssignmentExpression
PropertyName :
Identifier
StringLiteral
NumericLiteral
AssignmentExpression :
ConditionalExpression
LeftHandSideExpression AssignmentOperator AssignmentExpression
|
And ConditionalExpression ultimately bottoms out in
| Code: | PrimaryExpression :
this
Identifier
Literal
ArrayLiteral
ObjectLiteral
( Expression )
|
where Literal includes numeric literals. So, seeing as my syntax is good, why would I want to use the wrong type? I believe this is a bug in the validator, plain and simple. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Nov 16, 2006 - 05:23 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23855
|
|
My appologies, I agree it looks to be a bug, I was trying to find a quick workaround for you. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Aug 16, 2007 - 10:10 PM
|
|
Registered Member


Joined: May 06, 2005
Posts: 3
|
|
Yet here we are in version 5.5.1 and we still have this stupid warning, yet the validator still can't identify an extraneous comma that makes IE collapse in a heap. It makes me wonder if we are in 2007 or 1977. |
|
|
| |
|
|
|
 |
|
|
| |
|
|
 |
|
 |
|
|
|
 |