[Objectscript-users] Java integration problem
Brought to you by:
rob_d_clark
From: Josef J. <Jos...@fr...> - 2004-09-13 11:13:09
|
Hello list, Since I can't acces the list archives (which appear to be completely = non-functional by the way), I'm posting this directly to this list. I have a script file that extends a java class and overloads a java = function in that class, "generateAtis(MetarData metarData)" Suppose you have this java snippet: MetarData myMetarData =3D MetarInput.readMetarXML(inputXML); Scope outputScope =3D new BasicScope(OscriptInterpreter.getGlobalS= cope()); OscriptInterpreter.eval( readScriptFile("scripts/AtisOutput.os"), = outputScope ); OscriptInterpreter.eval("metarData;", outputScope).opAssign(JavaBr= idge.convertToScriptObject(myMetarData)); Value oScript =3D OscriptInterpreter.eval("(new ScriptedAtisOutput= ()).generateAtis(metarData)", outputScope); Also suppose that "var metarData;" is set in the script file that is = evaluated. The eval of "metarData" that I use to convert (or wrap) the = java object myMetarData to the script object metarData fails. The error message: oscript.exceptions.PackagedScriptObjectException: NoSuchMemberException: = no such member: (undefined): =3D Any ideas? I have a very hard time digging through the documentation as = there are near zero actual java integration examples. Most of the examples = deal with script code, and writing whole applications in script. I'm grateful for any and all help or pointers you could give me. regards, =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D DI (FH) Josef Jahn Product Development Expert smartStrips Tower and Airport Solutions FREQUENTIS GmbH Wolfganggasse 58-60 A-1120 Vienna, Austria Tel.: (+43) - 1 - 811 50 - 3222 e-mail: Jos...@fr...=20 home page: www.taptools.com =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D |