Created
September 18, 2009 05:45
-
-
Save Synesso/188901 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ java -jar js.jar | |
Rhino 1.7 release 2 2009 03 22 | |
js> load ("mootools-1.2.3-core-server.js"); | |
js> var Cat = new Class({ | |
> initialize: function(name){ | |
> this.name = name; | |
> } | |
> }); | |
js> var kitty = new Cat("Kitty"); | |
js> print(kitty.name); | |
undefined | |
js> Cat.initialize | |
js> Cat.initialize(); | |
js: "<stdin>", line 11: uncaught JavaScript runtime exception: TypeError: Cannot find function initialize in object | |
function () { | |
Object.reset(this); | |
if (newClass._prototyping) { | |
return this; | |
} | |
this._current = $empty; | |
var value = (this.initialize) ? this.initialize.apply(this, arguments) : this; | |
delete this._current; | |
delete this.caller; | |
return value; | |
} | |
. | |
at <stdin>:11 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment