Hi,

it seems to be a bug and Andreas has already submit an issue for the problem

Thanks Juergen

Bernard Marcelly wrote:
Bonjour Andreas,

( unrelated note : your messages have a "reply-to" which disturbs my emailer. It should read dev@api.openoffice.org )

Message du 2006-09-13 09:56:
here is my Java code snippet:

XScriptProviderSupplier scriptProviderSupplier = (XScriptProviderSupplier)UnoRuntime.queryInterface(XScriptProviderSupplier.class, xComponent); XScriptProvider xScriptProvider = scriptProviderSupplier.getScriptProvider(); XScript xScript = xScriptProvider.getScript("vnd.sun.star.script:Library1.Module1.Main?language=Basic&location=document");

If the document is loaded in hidden mode a get the error: com.sun.star.script.provider.ScriptFrameworkErrorException: BasicProviderImpl::getScript: no script!

If the document is visible the code works without any problem.


Now I see that I misunderstood your problem.
Well, I created the equivalent code in OOoBasic and I found the same behaviour: OK if visible, KO if hidden.
My opinion is this is a bug (or a very annoying functional limitation).

For those interested, this Basic code calls a simple macro in a document. This code is run from My macros or from another document.

props(0).Name = "Hidden"
props(0).Value = True
monDoc = StarDesktop.loadComponentFromURL(adrDoc, "_blank", 0, props())
scriptPro = monDoc.getScriptProvider()
monScript = scriptPro.getScript("vnd.sun.star.script:Standard.Module1.ecrire?language=Basic&location=document")
monScript.invoke(Array(), Array(), Array())
monDoc.close(True)

Regards
   Bernard

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


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

Reply via email to