Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


Hello,

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.
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.

Jan

On Fri, Aug 11, 2017 at 1:06 AM, jan d <dittrich.c.jan@gmail.com> wrote:

Hi Miklos, Hi List,

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.
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.

Jan


On Tue, Aug 8, 2017 at 9:30 AM, Miklos Vajna <vmiklos@collabora.co.uk>
wrote:

Hi,

On Tue, Aug 08, 2017 at 09:21:36AM +0200, jan d <dittrich.c.jan@gmail.com>
wrote:
POSSIBLE PROBLEM SOURCES:
* I was unable to find the docuementation for
g_ImplementationHelper.addImplementation e.g. if it takes a class or an
instance. I tried with both (the inked example is an instance), non
worked.

https://gerrit.libreoffice.org/gitweb?p=sdk-examples.git;a=
blob;f=TuesdayPython/TuesdayPrinter.py;hb=HEAD#l61

I think this does something similar to your use-case, and there you can
see that addImplementation() takes a class, not an instance.

Regards,

Miklos




Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.