Subj : Loading code into runtime; and error reporting issues To : netscape.public.mozilla.jseng From : "Alan Kemp" Date : Wed Feb 04 2004 05:56 pm Hi, I am currently embedding spidermonkey into my app, which has been a lot less painfull than I was expecting. However there are a couple of points I would appreciate if someone could clarify. First, what it the correct method to load a file from disk containing a bunch of functions so that those functions are then available for other scripts or c-code to call? At the moment I am JS_EvaluateScript(..)'ing the code and the runtime (the context?) "remembers" them for later use. I thought that JS_CompileScript(..) would have the same effect, but doing that instead results in undefined function names when I try to call them. Secondly, when an attempt to call an undefined function is made I have an error reporter setup to grab the error and handle it. However, there seems to be no way of telling when function name was called from the error reporter? I would like to provide a more meaningful output than the default "undefined is not a function". Is that information available at this stage? Thanks in advance, Alan .