E
Erik Wegner
Hi,
on writing some nice javascript classes, I stumble upon the following
error, which I find no hint for:
First, there is an object:
function pic(bname, x, y) {
this.x = x;
this.y = y;
this.objektid = bname;
this.positionXY = function(posx, posy) {
// some code
}
this.move = function() {
// some code
}
}
When loading my sample page, I create 7 objects by calling
apic = new pic("examplename", 150, 150);
which works fine.
After a while, I click on a hyperlink, which calls a javascript
function. Within this function, I repeat the creation step exactly
(copy&paste) as above, but now Firefox presents the error message:
Fehler: uncaught exception: [Exception... "Cannot convert
WrappedNative to function" nsresult: "0x8057000d
(NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN)" location: "JS frame ::
http://localhost/~user/project/js/lib.js :: anonymous :: line 255"
data: no]
Line 255 looks like
apic = new pic("examplename", 150, 150);
and gets already called 7 times before my eightth call which then
fails. I have no idea where to look for a solution.
Thanks a lot for any suggestions!
Greetings
Erik
on writing some nice javascript classes, I stumble upon the following
error, which I find no hint for:
First, there is an object:
function pic(bname, x, y) {
this.x = x;
this.y = y;
this.objektid = bname;
this.positionXY = function(posx, posy) {
// some code
}
this.move = function() {
// some code
}
}
When loading my sample page, I create 7 objects by calling
apic = new pic("examplename", 150, 150);
which works fine.
After a while, I click on a hyperlink, which calls a javascript
function. Within this function, I repeat the creation step exactly
(copy&paste) as above, but now Firefox presents the error message:
Fehler: uncaught exception: [Exception... "Cannot convert
WrappedNative to function" nsresult: "0x8057000d
(NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN)" location: "JS frame ::
http://localhost/~user/project/js/lib.js :: anonymous :: line 255"
data: no]
Line 255 looks like
apic = new pic("examplename", 150, 150);
and gets already called 7 times before my eightth call which then
fails. I have no idea where to look for a solution.
Thanks a lot for any suggestions!
Greetings
Erik