Paolo Mantovani wrote:
> Alle 09:44, giovedì 20 aprile 2006, Carsten Driesner ha
scritto:
> [...]
>> Hi Paolo,
>>
>> I see your point and want to discuss your proposal
with the scripting
>> developer. I will add more information after this
discussion.
>
> Great! thank you!
>
>> Currently I see some problems regarding your
proposed solution. It's
>> possible that several instances of the add-on
toolbar exist at one point
>> of time (e.g. three open writer documents). The
static code must be
>> aware of that and select the correct frame
(instance).
>> A possible
>> solution would be to add the frame to the
CommandEvent struct.
>
> I must admit that I don't understand this problem.
> In the current addon's implementation, the
toolbar-button calls the macro
> specified in the URL field, without to pass the frame
reference. (at least
> AFAIK)
>
> From the side of the static code, you can use
StarDesktop.currentComponent()
> to get the document that contains the toolbar from
which the macro has been
> launched.
> At least, this is what I currently do in my starbasic
addon's
>
>
>> I am not sure why you use
"CommandURL.statusChanged", because
>> statusChanged must be called by the add-on code.
>
> yes, most likely my example was a bit confused because
...I was a bit confused
> too!!!
>
>
>> The control doesn't
>> know when to call it. I think you mean something
like
>> "CommandURL.notify" which is called by
the control to provide event
>> information.
>
> Yes this is exactly what I meant.
Hi Paolo,
Mathias already gave a very good explanation why there is
actually no
real way to support a Basic based DispatchProvider.
Currently there is
no way that a Basic based add-on can provide a dispatch
object which
communicates with the toolbar controller. So the most
important
communication line <add-on> -> <toolbar
controller> doesn't work. I
discussed this problem with Andreas Bregas (responsible for
the
scripting part) and there is a plan to support services with
Basic for
the next major version. Therefore I see your point, but I
fear we don't
have a solution yet.
Regards,
Carsten
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|