Hi Paolo,
Hi,
Andreas Schlüns ha scritto:
Hi Carlos,
(I'm using Automation Bridge to communicate with OOo)
After reading again all the stuff and trying to digest the java
sample, this is what I conluded:
I need to implement my own "DispatchProvider" as a COM object an pass
it as a parameter to "registerDispatchProviderInterceptor", in the
same way I do to register listeners, am I right? (is this the reason
why Ariel said this can't be achieved with Basic?)
Exactly. You "register" your interception in the same you register a
listener. registerDispatchProviderInterceptor() is the right method
doing that.
And yes ... OOo basic do not support complex structures as e.g. classes
and so it's not possible to implement an interceptor in basic.
Why not? You can register your own dispatch-interceptor in Starbasic and
you can even define your custom dispatches in order to react to user
actions
Please find the small example document in attachment.
You are right ... it's possible ... but I wouldnt do that !
Why ?
a)
Method createUnoListener() was not thought to be used that way.
If you call it a temp object will be cerated inside memory (using
refelection) which maps your basic methods to an simulated UNO API.
Its very tricky doing so ... and at least you need more then one
instance because it's not possible to simulate more then one interface
for the same basic instance.
b)
On the other side I believe you can run into trouble with lifetime of
your basic objects. They are bound to the document ... if it's removed
from memory your basic bindings are gone ... but might be the dispatch
objects are well known outside. (Not only menus and toolbars are
interested on dispatches!) Such reflection-proxy-objects will run into
dead bindings ... an idea whats happen then ? - crash !
....
If you know what are you doing there you can try it ... but at least I
think it's one for OOo-API-experts .-)
ciao
Paolo Mantovani
Regards
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]