Hello, I have a fairly basic question, I'm writing an app which I want to include scripting support for and BSF seems to me to be a good option. I have the following wokring fine:
--- BSFManager.registerScriptingEngine("Jython", "org.apache.bsf.engines.jython.JythonEngine", new String[]{"py"}); objBM = new BSFManager(); obj = objBM.eval(pstrLanguage, null, 1, 1, "'Neil' * 5"); --- This returns 'NeilNeilNeilNeilNeil' - all good so far. However I want to be able to pass Java variables to Jython (I'll include JRuby and Groovy again at some point). For this, I reckon I need to use the apply function. However, I'm confused - the docs state that I need : lang - no probs, use "Jython" source - my script is in a string so do I need to write this out to temp file and load it back in again? lineNo - use 1 columnNo - use 1 funcBody - this is an Object pointing to a 'multi-line value returning script to evaluate' - here I have absolutley no idea what this is - can anyone point me in the right direction please? paramNames - understand this arguments - understand this too I've looked through the examples on the website but a fair number of the links are dead and the other embedding examples simply point to evals. So my basic problem is that I'm stuck as to the source - do I need to write a file out and in again and also for the funcBody - I simply have no idea what this is getting at. Any and all pointers would me most appreciated, thanks in advance. Cheers, Neil -- Open WebMail Project (http://openwebmail.org) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]