Re: Registration of an accelerator at extension installation

2015-06-25 Thread Oliver Brinzing

Hi Amenel,

> Your first recommendation, i.e. XJobExecutor + Accelerators.xcu was 
ineffective for the command
> attached to opening that >main dialog window. I don't know why, since the 
protocol handler was
> instantiated! I ended up removing the XJobExecutor
> interface, its method, and the Accelerators.xcu file.

Have you tried the "Accelerators.xcu" with a known ".uno" command for testing 
purpose?
Did it work?

I have an extension where i use XJobExecutor and Accelerators.xcu without XJob.
The extension gets instantiated at the time i use the accelerator key.
The "service:xxx" url should do this.

Regards
Oliver



-
To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
For additional commands, e-mail: api-h...@openoffice.apache.org



Re: Registration of an accelerator at extension installation

2015-06-25 Thread Amenel VOGLOZIN
Hi Oliver,
Thank you for you help: I have succeeded in my goal, which was to make it 
possible to open, using an accelerator, the main window of an extension right 
after installation of the extension.
Basically, I had to provoke the instantiation of the extension, using your 
second recommendation, i.e. XJob + custom service + Jobs.xcu. In the execute 
function of the XJob interface, I installed the desired accelerator into the 
global accelerator configuration.
Your first recommendation, i.e. XJobExecutor + Accelerators.xcu was ineffective 
for the command attached to opening that main dialog window. I don't know why, 
since the protocol handler was instantiated! I ended up removing the 
XJobExecutor interface, its method, and the Accelerators.xcu file.
Lessons learned: the instantiation at startup is necessary, and the 
programmatic accelerator configuration is also necessary.
Thanks.

  De : Oliver Brinzing 
 À : api@openoffice.apache.org 
 Envoyé le : Mercredi 24 juin 2015 20h29
 Objet : Re: Registration of an accelerator at extension installation
   
Hi Amenel,

you can use an Accelerators.xcu file in you extension, for example:

[...]
    
        
            service:my.extension.Service?myParam1
        
    

and register it during extension installation, for example add



to the manifest.xml of your extension.
your service has to implement the "com.sun.star.task.XJobExecutor" Interface 
with the
trigger(string  Event ) method.

if you want your extension being instantiated during aoo startup, implement the
"com.sun.star.task.XJob Interface" with it's execute(NamedValue[] args) method.

add a Jobs.xcu, for example:

https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Jobs/Configuration


http://openoffice.org/2001/registry"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
    
        
            
                my.extension.Service
            
        
    

    
        
            
                
            
        
    


and register in "manifest.xml"


Regards
Oliver





-
To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
For additional commands, e-mail: api-h...@openoffice.apache.org



  

Re: Registration of an accelerator at extension installation

2015-06-24 Thread Oliver Brinzing

Hi Amenel,

you can use an Accelerators.xcu file in you extension, for example:

[...]


service:my.extension.Service?myParam1



and register it during extension installation, for example add



to the manifest.xml of your extension.
your service has to implement the "com.sun.star.task.XJobExecutor" Interface 
with the
trigger(string  Event ) method.

if you want your extension being instantiated during aoo startup, implement the
"com.sun.star.task.XJob Interface" with it's execute(NamedValue[] args) method.

add a Jobs.xcu, for example:

https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Jobs/Configuration


xmlns:oor="http://openoffice.org/2001/registry"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>




my.extension.Service














and register in "manifest.xml"
manifest:media-type="application/vnd.sun.star.configuration-data" />


Regards
Oliver



-
To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
For additional commands, e-mail: api-h...@openoffice.apache.org