Stephan Bergmann wrote:
Joerg Budischewski wrote:
Hi,
Stephan Bergmann wrote:
[...]
BTW, do you know whether PyUNO and the bridge between PyUNO and
binary UNO already support the current context?
It seems, that I have overlooked this. How about other scripting
languages (ole, basic) ? I can add very simple native runtime
functions to pyuno to allow the access (wrappers arrount
get/setCurrentContext() functions).
I think this is the best solution (we will also use it for CLI UNO).
When a given UNO environment is designed so that the cppu dynamic
library is available in process, anyway, it is the best choice to re-use
the binary UNO current context mechanism from cppu in that UNO
environment, too. This seems to be the case for PyUNO and CLI UNO, for
example. (It is not the case for Java UNO, which can be run in a
Java-only process, so Java UNO has its own current context---which it
has to synchronize with other potential current contexts within the same
process, but doesn't at the moment.)
Could it be another option to add a CurrentContextHolder property to
the component context ? The property would be an uno object with just
one property (currentContext), which simply delegates to the C++
get/setCurrentContext() runtime functions. Such a functionality could
be used by all scripting languages.
I don't like the idea of using UNO to implement functionality of the UNO
runtime substrate. This has shown to be bad more often than not (the
three UNO methods of XInterface; aggregation; etc.).
I second this opinion.
-Stephan
Kay
But errors in script code (not layering the context correctly) can
easily generate very strange and difficult to debug side effects, so I
am not 100% sure, that this a gread idea.
Bye,
Joerg
---------------------------------------------------------------------
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]