Re: [Libreoffice] candidate for a new python section in SDK examples page

2011-12-08 Thread Michael Meeks
On Wed, 2011-12-07 at 23:44 +0100, Lionel Elie Mamane wrote: So - I know what __import__ is meant to do - but it appears to return an entirely useless object; one that has nothing even slightly helpful associated with it that would let me find an associated member variable. We seem

[Libreoffice] candidate for a new python section in SDK examples page

2011-12-07 Thread Laurent Godard
Hi all the SDK examples page does not have python section (see sdk/examples/examples.html) on the other hand, i have a proof of concept extension that illustrates how to use XToolPanel i wrote in python Here is the code and the extension. If your review is ok, i'll add this python section in

Re: [Libreoffice] candidate for a new python section in SDK examples page

2011-12-07 Thread Stephan Bergmann
On 12/07/2011 01:44 PM, Laurent Godard wrote: feel free to send me any remark toolpanel.py should use passive registration (i.e., an accompanying .component file, which then is referenced in META-INF/manifest.xml). desktop/test/deployment/passive builds an example .oxt containing passively

Re: [Libreoffice] candidate for a new python section in SDK examples page

2011-12-07 Thread Michael Meeks
On Wed, 2011-12-07 at 15:04 +0100, Stephan Bergmann wrote: toolpanel.py should use passive registration (i.e., an accompanying .component file, which then is referenced in META-INF/manifest.xml). desktop/test/deployment/passive builds an example .oxt containing passively registered UNO

Re: [Libreoffice] candidate for a new python section in SDK examples page

2011-12-07 Thread Miklos Vajna
On Wed, Dec 07, 2011 at 03:49:10PM +, Michael Meeks michael.me...@suse.com wrote: mod = __import__ ( actual python-module-name ) implHelper = mod.__dict__.get( g_ImplementationHelper , None ) is supposed to work, or indeed any half-way decent documentation on what

Re: [Libreoffice] candidate for a new python section in SDK examples page

2011-12-07 Thread Lionel Elie Mamane
On Wed, Dec 07, 2011 at 03:49:10PM +, Michael Meeks wrote: Any python genius that can tell me how: I'm not sure I qualify as genius, but let me try. mod = __import__ ( actual python-module-name ) implHelper = mod.__dict__.get( g_ImplementationHelper , None ) is

Re: [Libreoffice] candidate for a new python section in SDK examples page

2011-12-07 Thread Caolán McNamara
On Wed, 2011-12-07 at 17:07 +0100, Miklos Vajna wrote: In short, it checks if there is a funcion named g_ImplementationHelper in actual python-module-name. g_ImplementationHelper can be googled for, or opengroked. Its the magic smoke which pyuno queries to find out what services a python

Re: [Libreoffice] candidate for a new python section in SDK examples page

2011-12-07 Thread Michael Meeks
Hi Miklos Lionel, On Wed, 2011-12-07 at 17:07 +0100, Miklos Vajna wrote: On Wed, Dec 07, 2011 at 03:49:10PM +, Michael Meeks michael.me...@suse.com wrote: mod = __import__ ( actual python-module-name ) implHelper = mod.__dict__.get( g_ImplementationHelper , None )

Re: [Libreoffice] candidate for a new python section in SDK examples page

2011-12-07 Thread Lionel Elie Mamane
On Wed, Dec 07, 2011 at 08:04:14PM +, Michael Meeks wrote: On Wed, 2011-12-07 at 17:07 +0100, Miklos Vajna wrote: On Wed, Dec 07, 2011 at 03:49:10PM +, Michael Meeks michael.me...@suse.com wrote: mod = __import__ ( actual python-module-name ) implHelper =