Hey,
my Class:
---
function greasevz() {
//init
}
greasevz.prototype = {
...
//GM-Memory
load: function(name, def) {
return eval(GM_getValue("schueler"+name, (def || '({})')));
},
save: function(name, val) {
GM_setValue("schueler"+name, uneval(val));
},
delete: function(name) {
GM_deleteValue("schueler"+name);
},
...
}
---
An example script:
---
g = new greasevz();
g.save("scripts", {0: function() { GM_setValue("example", "This is an
example."); alert(GM_getValue("example")); } } );
scripts = g.load("scripts");
alert(typeof(scripts)); // All works fine, i get an JSON Object.
alert(typeof(scripts[0])); // Still all fine, a function
scripts[0](); // function runs but throws out an error: Access
Violation.
---
http://wiki.greasespot.net/Greasemonkey_access_violation
I've read the article and I know, why GM throws out an error, but how
can I fix this problem?
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" 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/greasemonkey-users?hl=en.