Hi Ariel,

> XScriptInvocationContext XScriptContext.getInvocationContext()
> 
> * this last one has only a method:
> XEmbeddedScripts XScriptInvocationContext.getScriptContainer()
> 
> * and XEmbeddedScripts:
> boolean XEmbeddedScripts.getAllowMacroExecution();
> XStorageBasedLibraryContainer XEmbeddedScripts.getBasicLibraries();
> XStorageBasedLibraryContainer XEmbeddedScripts.getDialogLibraries();
> 
> 
> Can we get an XFrame or XController from XStorageBasedLibraryContainer?
> Well, here I got quite lost in the inheritance hierarchy, but I think we
> can't. :-(

query the invocation context for this interface.

The problem is we can't make getInvocationContext return an XModel or an
XController, exactly because it can be either one. That is, if you
invoke the script from within a form document, then the invocation
context will be an XModel. If you invoke it from the query designer,
which does not have an own XModel, then it will be an XController.

So, you need to queryInterface for either XModel or XController.

In the new API documentation (which I failed to publish with the
snapshot), this is documented.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer         [EMAIL PROTECTED] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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

Reply via email to