Paolo Mantovani wrote:

> 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

Yes, but there is no code in your Add-On that maintains the status of
the buttons in the toolbar (it is currently impossible to write such
code in basic because you have to provide an object to the dispatch
framework). Carsten proposal enriches the communication of this object
to the dispatch framework and so it is nothing that can be used from Basic.

The interface between a basic code snippet and a toolbar button is only
"passive", means: the basic code is called from inside the toolbar
button, but never the other way around because there is no object in the
basic code that is bound to the controller.

Any static approaches will fail because the whole communication between
toolbar controls and the "status event sources" is dynamic by nature.
*If* we think about a way to support status information via basic we
should think about helper dispatch objects that can be parameterized
from basic. The main problem will be how we can insert them into the
dispatch chain. Perhaps we can use the macro dispatcher as a medium (the
same object that executes the macro when the button is clicked).

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

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

Reply via email to