gecko-dev/js/rhino
nboyd%atg.com 87a029eeb9 Fix bug:
Subject:
             [Rhino] Script compiler bug?
        Date:
             Tue, 12 Dec 2000 22:08:23 GMT
       From:
             dave russo <d-russo@ti.com>
 Organization:
             Deja.com
 Newsgroups:
             netscape.public.mozilla.jseng




The following script does not seem to compile properly (using Rhino
1.5R1):

test.js:
var test = {};
test.foo = function () { print('foo')}
test.bar = function () { print('bar')}

After compiling test.js ("java org.mozilla.javascript.tools.jsc.Main
test.js"):

js> loadClass('test')
js> test.foo()
bar
js> load('test.js')
js> test.foo()
foo

Note that changing test.js to read:

var test = {};
test.foo = function foo() { print('foo')}
test.bar = function bar() { print('bar')}

Works around the problem.  Is there a problem with anonymous functions?


Sent via Deja.com
http://www.deja.com/
2000-12-13 15:17:24 +00:00
..
examples Add construction of Counter from Java 2000-12-05 16:42:39 +00:00
macbuild importable XML project for CWPro6. 2000-11-23 04:27:33 +00:00
org/mozilla Fix bug: 2000-12-13 15:17:24 +00:00
src/org/mozilla Fix bug: 2000-12-13 15:17:24 +00:00
toolsrc/org/mozilla/javascript/tools Fix 62559, 58479 2000-12-12 14:35:38 +00:00
Makefile Twiddle Make usage message. 2000-11-29 22:36:06 +00:00
README.html Add license boilerplate. 1999-10-25 17:36:20 +00:00
apiClasses.properties Upgrade to Ant 1.2 and remove deprecated tasks. 2000-11-01 18:43:55 +00:00
build.xml Sense JDK1.3 dependencies. 2000-11-27 22:23:40 +00:00
built-on-date timestamping file 2000-11-18 02:24:06 +00:00
manifest Remove class path for merging into a single JAR file. 1999-05-26 19:52:40 +00:00

README.html

<html>
<!-- 
   - The contents of this file are subject to the Netscape Public
   - License Version 1.1 (the "License"); you may not use this file
   - except in compliance with the License. You may obtain a copy of
   - the License at http://www.mozilla.org/NPL/
   - 
   - Software distributed under the License is distributed on an "AS
   - IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
   - implied. See the License for the specific language governing
   - rights and limitations under the License.
   - 
   - The Original Code is Rhino code, released
   - May 6, 1999.
   - 
   - The Initial Developer of the Original Code is Netscape
   - Communications Corporation. Portions created by Netscape are
   - Copyright (C) 1998-1999 Netscape Communications Corporation. All
   - Rights Reserved.
   - 
   - Contributor(s):
   - Norris Boyd
   - 
   - Alternatively, the contents of this file may be used under the
   - terms of the GNU Public License (the "GPL"), in which case the
   - provisions of the GPL are applicable instead of those above.
   - If you wish to allow use of your version of this file only
   - under the terms of the GPL and not to allow others to use your
   - version of this file under the NPL, indicate your decision by
   - deleting the provisions above and replace them with the notice
   - and other provisions required by the GPL.  If you do not delete
   - the provisions above, a recipient may use your version of this
   - file under either the NPL or the GPL.
  -->
<body>
<h1>
<span CLASS=LXRSHORTDESC>
Rhino: JavaScript in Java<p>
</span>
</h1>
<span CLASS=LXRLONGDESC>
Rhino is an implementation of JavaScript in Java. Documentation can be found 
<a href="http://www.mozilla.org/js/rhino/rhino.html">here</a>.
</span>
</body>
</html>