Subj : Re: Stuck with the basics To : netscape.public.mozilla.jseng From : "Stu" Date : Wed May 28 2003 09:34 am "Brendan Eich" wrote in message news:3ED3AC00.20604@meer.net... > Stu wrote: > > > I've been using the documentation you mention from the start and not > > gettting anywhere theres not decent examples of Complile Script and Call > > Function. > > > The API you were calling takes the name of the function to compile, > followed by number and names of its formal parameters, followed by the > body of the function in a C string. Therefore you shouldn't expect to > have to write the entire function, including "function Hello() {" before > the body, and "}" after. That would be redundant, unnecessary. > > > > How do you debug? I've got error messages passing out to a ErrorReporter > > which writes to screen but thats it at the moment. I'd love more info can > > you point me towards a Debugging example? > > > I meant run the js shell, or your embedding of the 'monkey, under a > C/C++ debugger. If you're on Windows, MSVC and others come to mind. On > Linux and other Unixes, gdb. What platform are you using? > > /be If there had been an example of someone using the CompileFunc in the API docs i'd have been fine but the only info was that I need to pass a pointer to the script, which i did. But I took that to mean include the function name line I'm using MSNT 4 SP6a and I am using the 'Monkey embedded into a C++ project but debugging it is still a nightmare. .