Hi Jürgen,
Message du 2006-10-10 17:07:
your problem is probably quite simple. you extracted the code from a
Java example where you see the mapped types from IDL. In the IDL file
you see the corresponding IDL types. An out parameter is mapped to an
array of length 1, a sequence is mapped to an array generally and an any
is mapped to Java Object.
For example:
IDL:
[out] sequence<any>
is mapped to Java:
Object[][]
OK, I was not aware of that mapping of out parameters.
out parameters working fine, you simply have to initialize the array and
an array with the length of 0 is fine.
Yes, this is what I did in Javascript. And it does not work with a
called Basic script.
importClass(Packages.com.sun.star.uno.UnoRuntime);
importClass (Packages.com.sun.star.script.provider.XScriptProviderSupplier);
importClass (Packages.com.sun.star.script.provider.XScriptProvider);
oDoc = XSCRIPTCONTEXT.getDocument();
xsps = UnoRuntime.queryInterface(XScriptProviderSupplier,oDoc);
scriptPro = xsps.getScriptProvider();
xsp = UnoRuntime.queryInterface(XScriptProvider, scriptPro);
xScript =
xsp.getScript("vnd.sun.star.script:Standard.Module2.show2?language=Basic&location=document");
args = new Array(1);
args[0] = "Hello";
a = new Array( new Array() );
b = new Array( new Array() );
xScript.invoke(args, a, b);
In the same document there is macro show2 in Module2:
Sub show2( mess As String )
MsgBox(mess)
mess = "Finished" ' here I modify the caller variable
End Sub
I can see the message "Hello". But at the return of invoke I have these
results:
b.length = 1
b[0].length = 0
And same for parameter a.
Does this mean that Basic parameters are not considered as inout ?
Regards
Bernard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]