[Geany-devel] Keybindings for GeanyPy

Matthew Brush mbrush at xxxxx
Sat Aug 6 06:17:40 UTC 2011


On 08/05/11 23:09, Matthew Brush wrote:
> On 08/05/11 23:01, Lex Trotman wrote:
>> On 6 August 2011 15:05, Matthew Brush<mbrush at codebrainz.ca> wrote:
>>> signals on it (IIR). So plugins would do:
>>
>>> geany.object.connect('document-open', on_document_open_handler)
>>
>> Does that allow on_document_open_handler() to be a bound member function?
>>

Sorry, yeah, you could do like:


   import geany

   class MyPlugin(geany.Plugin):

     def __init__(self):
       geany.object.connect('document-open', self.on_document_open)

     def on_document_open(self, *args...):
       do_stuff()


If that's what you meant.

Cheers,
Matthew Brush



More information about the Devel mailing list