Page 1 of 1
[Solved] Options Dialog not showing
Posted: Mon Jun 15, 2009 5:41 pm
by brecht.yperman
Hi,
I want to add an options dialog for my extension. I downloaded the sample from the Dev Guide and tried to change everything to my needs.
I have checked every reference five times now, but my options dialog still won't show.
I do get a node in the Options tree under 'Writer', as specified in my OptionsDialog.xcu, but the dialog doesn't show. Neither is the Options... button enabled in the Extension Manager.
How can I find out what's happening?
The references I'm now checking:
- I start from OptionsDialog.xcu.
- This refers to my OptionsPage: %origin%/../../../../../dialogs/OptionsPage.xdl
- This also refers to a schema by Id <packagename>.<schemaname> which are in /registry/schema/<package>/<schema>
- The Uno manifest.xml specifies the xcs and the xcu
Thanks,
Brecht
Re: Options Dialog not showing
Posted: Mon Jun 15, 2009 7:09 pm
by hanya
Hi,
I think your EventHandlerService implementation has problems. Try empty "EventHandlerService" value in the OptionsDialog.xcu file like the following.
Code: Select all
<prop oor:name="EventHandlerService">
<value></value>
</prop>
After the modification, install with it and check your option page is shown correctly. If the page is shown, problems are there in your EventHandlerService implementation. If not, OptionsDialog.xcu or other specification may have problems.
Re: Options Dialog not showing
Posted: Mon Jun 15, 2009 10:04 pm
by meaulnes
Thank you Hanya,
I will try this but as I have been waiting answer for a while I passed to an other subject.
I probably will come back to this later.
Re: Options Dialog not showing
Posted: Tue Jun 16, 2009 10:34 am
by brecht.yperman
Thanks,
Now it shows in the 'Options' dialog under writer, but the button in the extension manager is still disabled.
Re: Options Dialog not showing
Posted: Tue Jun 16, 2009 11:20 am
by hanya
brecht.yperman wrote:
Now it shows in the 'Options' dialog under writer, but the button in the extension manager is still disabled.
Does your extension have its extension identifier ?
In the case of the sample of the OptionsDialog in the DevGuide, you needs to make description.xml file to specify its identifier according to the DevGuide.
http://wiki.services.openoffice.org/wik ... dentifiers
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/description/2006"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:d="http://openoffice.org/extensions/description/2006">
<identifier value="org.openoffice.demo.OptionsPageDemo" />
</description>
And you need to set the Id of the child of the Leaves node to the extension identifier.
Code: Select all
. OptionsDialog.xcu
<node oor:name="Nodes">
<node oor:name="Writer" oor:op="fuse">
<node oor:name="Leaves">
<node oor:name="org.openoffice.demo.OptionsPageDemo" oor:op="fuse">
<prop oor:name="Id">
<value>org.openoffice.demo.OptionsPageDemo</value> <---
</prop>
This is described in the DevGuide.
http://wiki.services.openoffice.org/wik ... ions_Pages
Re: Options Dialog not showing
Posted: Tue Jun 16, 2009 11:32 am
by brecht.yperman
Found the problem with my EventHandlerService: it was not registered as a RegistrationClass. I had to edit the nbproject/project-uno.properties so the registration.classname property also contained my DialogEventHandler.
That's the problem with those wizards: you never really learn what's underneath...
Re: Options Dialog not showing
Posted: Tue Jun 16, 2009 11:38 am
by brecht.yperman
Great, thanks!!! I was messing up some Ids there.