Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
MrFeinberg
21 Post subject: JavaScript: A dot following a number *is* decimal point!  PostPosted: Nov 15, 2006 - 10:19 PM
Veteran Member
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.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Nov 16, 2006 - 04:49 PM
Registered Member
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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
MrFeinberg
Post subject:   PostPosted: Nov 16, 2006 - 05:11 PM
Veteran Member
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.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Nov 16, 2006 - 05:23 PM
Registered Member
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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
jyutzler
Post subject:   PostPosted: Aug 16, 2007 - 10:10 PM
Registered Member
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.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits