Paolo Mantovani wrote:
Hi Carsten,

This is really great, but I've just one question:

In your tecnical specification I read:

"""
Every add-on which wants to support a toolbar must be a dispatch provider. Therefore one communication protocol for the new controls will be the normal duo com.sun.star.frame.XDispatch / com.sun.star.frame.XStatusListener.
"""

I guess that this will prevent the use of this feature from StarBasic developers, am I wrong ?

In this case, wouldn't be possible to add also a "static" management, directly from addons.xcu ?

In other words, if I could specify directly into addons.xcu not only the control type but also its properties and command url's, in most cases I could avoid the dispatch mechanism.

pseudo XML example :

<oor:component-data xmlns:oor="http://openoffice.org/2001/registry"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; oor:name="Addons" oor:package="org.openoffice.Office">

<node oor:name="AddonUI">
...
...
<node oor:name="OfficeToolBar">
        <node oor:name="org.openoffice.Office.blah.blah" oor:op="replace">
                <node oor:name="tlb01" oor:op="replace">
                        <prop oor:name="URL" oor:type="xs:string"/>
                        <prop oor:name="ControlType" oor:type="xs:string">
                                <value>ToggleButton/value>
                        </prop>
                        <prop oor:name="CommandURL.statusChanged" 
oor:type="xs:string">
                                
<value>macro:///blah.blah.statusChanged(oEvent)</value>
                        </prop>

Hi Paolo,

I see your point and want to discuss your proposal with the scripting developer. I will add more information after this discussion.

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 am not sure why you use "CommandURL.statusChanged", because statusChanged must be called by the add-on code. 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.

Regards,
Carsten

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

Reply via email to