Actually, it's probably the best syntax.  By having the double parentheses,
the JS interpreter knows the assignment operation within the first set of
parentheses has to occur before the condition test for true/false.  Without
the double set of parentheses, Netscape's interpreter flags this as a
potential syntax error (i.e. - "=" instead of "==").  So actually, the fact
IE doesn't see it as a problem is perhaps an example of Microsoft trying to
"think" for the programmer...

-----Original Message-----
From: Doug Melvin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 1:31 PM
To: [EMAIL PROTECTED]
Subject: Re: [Dynapi-Dev] [Bug #130357] small typo in list.js


That's just plain dodgy..

I do hope NetScrape get's it's act together..
It would be a dream (IMHO) to code  for a browser that
is fully WC3 DOM complient..

> use two parenthesis and NS6 will do fine
>
> if ((this.selected=b))
>
> Don't ask me why
>
>
> martin strom wrote:
>
> > i think it would, the reason i found this "bug"
> > was because ns6 thrown an error on that line..
> >
> > /m
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Cameron Hart
> > Sent: den 30 januari 2001 14:42
> > To: [EMAIL PROTECTED]
> > Subject: RE: [Dynapi-Dev] [Bug #130357] small typo in list.js
> >
> > perhaps it would be safer to assign the value first and then test the
> > condition...
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Michael
> > Pemberton
> > Sent: 30 January 2001 13:28
> > To: [EMAIL PROTECTED]
> > Subject: Re: [Dynapi-Dev] [Bug #130357] small typo in list.js
> >
> > please put the "typo" back.  What is does is set the value of
this.selected
> > to b and then evaluates the returned value (the new value of
this.selected).
> > It is needed to change the selected state of the item.
> > [EMAIL PROTECTED] wrote:
> > Bug #130357, was updated on 2001-Jan-28 14:27
> > Here is a current snapshot of the bug.
> > Project: DynAPI 2
> > Category: Core - Widgets
> > Status: Closed
> > Resolution: Fixed
> > Bug Group: None
> > Priority: 5
> > Submitted by: marstr
> > Assigned to : rainwater
> > Summary: small typo in list.js
> > Details: there's a small typo (i think) in list.js line 76
> > if (this.selected=b)
> >
> > should be
> > if (this.selected==b)
> >
> > right?
> > Follow-Ups:
> > Date: 2001-Jan-28 17:50
> > By: rainwater
> > Comment:
> > Doh!  Its been updated in CVS.  Closing this bug.
> > -------------------------------------------------------
> > For detailed info, follow this link:
> > http://sourceforge.net/bugs/?func=detailbug&bug_id=130357&group_id=5757
> > _______________________________________________
> > Dynapi-Dev mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/dynapi-dev
> > --
> > Michael Pemberton
> > [EMAIL PROTECTED]
> > ICQ: 12107010
> >
> > _______________________________________________
> > Dynapi-Dev mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/dynapi-dev
>
>
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev


_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev

_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev

Reply via email to