Closed Bug 286249 Opened 20 years ago Closed 20 years ago

error message thrown by exception

Categories

(Rhino Graveyard :: Core, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: gilles.barnier, Assigned: igor)

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705)
Build Identifier: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705)

       While surfing to the following page:

 

      <HTML>

      <HEAD> 

      </HEAD> 

 

      <BODY>

      <FORM METHOD=POST  id=myForm>

         <select name="countrySelect" class="dropdown">

            <option  selected=true>-UK-</option>

            <option>-USA-</option>

            <option>-Israel-</option>

         </select>

      <SCRIPT LANGUAGE="JavaScript">

      <!--

      // Unlucky assignment..... 

        document.forms[0].countrySelect.options[1].selected="true"  

      //-->

      </SCRIPT>

      </FORM>

      </BODY>

      </HTML>

 

            The error message thrown by the exception ("Could not convert true 
to boolean") 

We would have expected an assign to true for each attempt of non-null string 
assignment into the boolean variable, and false - otherwise. This behavior is 
supported by IE.



Reproducible: Always




The attached code is submitted by VERITAS under the MIT license, which is 
reproduced below.

 

The MIT License

Copyright (c) 2005 VERITAS Operating Company 

 

Permission is hereby granted, free of charge, to any person obtaining a copy of 
this software and associated documentation files (the "Software"), to deal in 
the Software without restriction, including without limitation the rights to 
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of the Software, and to permit persons to whom the Software is furnished to do 
so, subject to the following conditions:

 

The above copyright notice and this permission notice shall be included in all 
copies or substantial portions of the Software.

 

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
SOFTWARE.
Marking as invalid:

According to LiveConnect3,
http://www.mozilla.org/js/liveconnect/lc3_method_overloading.html, section
3.3.4, it is not possible to convert string to boolean when calling Java
methods. Since Rhino implements the specs fully, its behavior if one relies on
LiveConnect to get DOM implementation from Java one is correct.

I would suggest to file an enhancement report to add API to Rhino to override
LC3 rules if necessary.

Summary: error message thrown by exception → error message thrown by exception
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.