<div dir="ltr"><div><div><div>Hello, <br><br></div>Just for documenting it for people who might try this in the future: I managed to create the UnoService and have it reaact to the shortcut. <br></div>It seems that services can only be created directly and in the scope of the file/import that is run: Having it created inside a function did not work, moving it out to the first level (in python this means: no indention) it works. If someone knows why that is the case, I'd be ahppy if we could add a sentence on it to the PyUno documentation or so. <br><br></div>Jan<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 11, 2017 at 1:06 AM, jan d <span dir="ltr"><<a href="mailto:dittrich.c.jan@gmail.com" target="_blank">dittrich.c.jan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Miklos, Hi List,<br><br></div>I did some changes and passed the class instead of the instance but it does not work either; looking at the print messages that I inserted it seems to be never initialized. <br></div>I'll try to step through the TuesdayPrinter.py and see if that gives me any insights; if you have any other ideas,I'd be happy to hear what else could be wrong.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Jan<br></div><br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 8, 2017 at 9:30 AM, Miklos Vajna <span dir="ltr"><<a href="mailto:vmiklos@collabora.co.uk" target="_blank">vmiklos@collabora.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span><br>
On Tue, Aug 08, 2017 at 09:21:36AM +0200, jan d <<a href="mailto:dittrich.c.jan@gmail.com" target="_blank">dittrich.c.jan@gmail.com</a>> wrote:<br>
> POSSIBLE PROBLEM SOURCES:<br>
> * I was unable to find the docuementation for<br>
> g_ImplementationHelper.addImpl<wbr>ementation e.g. if it takes a class or an<br>
> instance. I tried with both (the inked example is an instance), non worked.<br>
<br>
</span><a href="https://gerrit.libreoffice.org/gitweb?p=sdk-examples.git;a=blob;f=TuesdayPython/TuesdayPrinter.py;hb=HEAD#l61" rel="noreferrer" target="_blank">https://gerrit.libreoffice.org<wbr>/gitweb?p=sdk-examples.git;a=<wbr>blob;f=TuesdayPython/TuesdayPr<wbr>inter.py;hb=HEAD#l61</a><br>
<br>
I think this does something similar to your use-case, and there you can<br>
see that addImplementation() takes a class, not an instance.<br>
<br>
Regards,<br>
<br>
Miklos<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>