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.

Regards
   Bernard

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to