Bernard Marcelly wrote:
Hello,
While struggling to call a script from another script I found some
oddities.
From Dev'Guide 18.5.2 "Implementing the XScript interface", I have
extracted this code:
public Object invoke( Object[] aParams,
short[][] aOutParamIndex,
Object[][] aOutParam )
This definition is not consistent with the (unpublished) IDL
com.sun.start.script.provider.XScript :
invoke( [in] sequence< any > aParams,
[out] sequence< short > aOutParamIndex,
[out] sequence< any > aOutParam )
If you call a script from Javascript you have to invoke like this:
args = new Array(1);
args[0] = "Hello";
a = new Array( new Array() );
b = new Array( new Array() );
xScript.invoke(args, a, b);
This means that Dev'Guide definition was implemented.
So, were is the error ? In the Dev'Guide and in Javascript
implementation ? In the IDL definition ? I would think the IDL is
correct because there is no need of sequence of sequence.
Another extract from Dev'Guide 18.5.2 :
// Initialise the out paramters - not used at the moment
aOutParamIndex[0] = new short[0];
aOutParam[0] = new Object[0];
Does it mean that transmission of out parameters is not yet implemented ?
I suspect this because I could not retrieve anything after an Invoke
from Javascript or from BeanShell. If this is not implemented, it should
be written clearly in the IDL description.
Bernard,
I had some trouble before with the invoke method on XScript, I figured
out I could get variables returned from a python script, see:
http://www.oooforum.org/forum/viewtopic.phtml?t=37282
Hope that helps
--
Darragh Sherwin
Propylon Legislative Workbench
http://www.propylon.com/solutions/parliament/index.html
+353-(0)1-4927456
+353-(0)87-1204654
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]