I'm trying to debug an a uncaught exception: Permission denied to get
property Object.constructor error.
I have some code like this:
myObject.js
------------
function myObject (arg1, arg2, arg3)
{
//does some constructor related stuff
}
myObject.prototype.createSomething = function()
{
// do more boring stuff
// return an Array;
}
manager.js
-----------
var fakeHashMap = new Object();
fakeHashMap['newmyobject'] = new myObject(foo, bar, baz);
try
{
var liStuff = fakeHashMap['newmyobject'].createSomething();
}
catch (error)
{
// do nothing
}
-----------
When I make the createSomething call, I get an error from protoype.js
(1.5) from Enumerable with something like uncaught exception:
Permission
denied to get property Object.constructor. Am I not using constructors
properly?
One other thing. In IE 6, the try catch seems to work and continues on
like no exception was ever thrown (everything works as expected), but
in
Firefox 2.0, I still get the permission denied error in the javascript
console and everything halts. It seems like the try catch doesn't seem
to be working in FF.
I've included the code from prototype.js where I think the error is
coming from.
var Enumerable = {
each: function(iterator) {
var index = 0;
try {
this._each(function(value) {
try {
iterator(value, index++);
} catch (e) {
if (e != $continue) throw e; //this is where the exception is
being thrown
}
});
} catch (e) {
if (e != $break) throw e;
}
return this;
},
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---