Mathias Bauer wrote:
Ariel Constenla-Haile wrote:

Hello,

thanks to Dietemar question concerning the complex toolbar, I read once again the Dev's Guide chap. about add-ons/ProtocolHandler.

There is advised NOT to "simply return itself in the queryDispatch() implementation. But ... to return specialized helper dispatch objects instead of the protocol handler instance. This helps to decrease the complexity of status updates."


Is this still valid ("still" == the Dev's Guide is getting too old too soon, there is a lot of old code there)? I ask because the plug-in, by default, returns the protocol handler instance. So if is still true, I will take this advise.

Well, keeping the dispatches separate first is a matter of style.
Listeners should be a private implementation detail of an object/Service
and shouldn't be exposed to introspection. If you don't care for this -
the code will become more complicated but from memory I don't recall a
case where it didn't work.

Well the plugin keeps it quite simple at the moment and it doesn't support complex toolbars right now. Anyway you can customize the generated code and can add support for complex toolbars by yourself. Maybe i will extend the uno-skeletonmaker to generate separate dispatch objects for each command on demand. And of course this would be integrated in the plugin as well ;-)

Juergen


Ciao,
Mathias


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

Reply via email to