>> The toolbar disables an entry for two reasons: 1. The queryDispatch(...) call on XDispatchProvider doesn't provide a dispatch object. <<
I put in some messageboxes to see when queryDispatch is called (and to see any exceptions thrown). It appears the queryDispatch method doesn't get called until I hit my custom menu (and those items are initialized). I was expecting them to be called on application startup based on the Jobs.xcu I have defined: <?xml version="1.0" encoding="UTF-8"?> <oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Jobs" oor:package="org.openoffice.Office"> <node oor:name="Jobs"> <node oor:name="startApp" oor:op="replace"> <prop oor:name="Service"> <value>com.appliedolap.objects.essbase.client.grid.staroffice.plugin.ui.Plug inProtocolHandler</value> </prop> </node> </node> <node oor:name="Events"> <node oor:name="onFirstVisibleTask" oor:op="replace"> <node oor:name="JobList"> <node oor:name="startApp" oor:op="replace"/> </node> </node> <node oor:name="OnNew" oor:op="replace"> <node oor:name="JobList"> <node oor:name="startApp" oor:op="replace"/> </node> </node> <node oor:name="OnLoad" oor:op="replace"> <node oor:name="JobList"> <node oor:name="startApp" oor:op="replace"/> </node> </node> </node> </oor:component-data> Based on this jobs.xcu, I would expect the initialization to happen on "onFirstVisibleTask", "OnNew" or "OnLoad". Am I wrong in that? BTW, it seemed to work in Ooo 1.1.4 without a problem. Tim Tim Tow Applied OLAP, Inc 256.990.0136 -----Original Message----- From: Carsten Driesner [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 14, 2006 3:15 AM To: [email protected] Subject: Re: [api-dev] Calc addin - Custom toolbar not enabled Tim Tow wrote: > I have a custom toolbar defined in Addons.xcu that is not enabling properly. > The icons appear to be found properly but are disabled. The same URL > is being used on custom menubar, so it appears as though it is > registered properly. Here is a snippet of the Addons.xcu for the toolbar: > > Two questions: > > 1. What could be causing the toolbar to be disabled (and what is the > best way to debug this issue?); and The toolbar disables an entry for two reasons: 1. The queryDispatch(...) call on XDispatchProvider doesn't provide a dispatch object. 2. The dispatch object sends a statusChanged notification with FeatureStateEvent.IsEnabled = false. This results in a disabled toolbar item. You have to check whether your queryDispatch function is called. If yes, please check your statusChanged notification. > > 2. Why does the submenu get the same icon as the toolbar when it isn't > specified to have an icon in Addons.xcu? OpenOffice.org always associates an image to a command URL. Therefore you see the same image on the toolbar and menu item. Regards, Carsten --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
