0

I've searched among the documentation of Python, and PyGtk but i couldn't find the right syntax for a generic signal handler written by the programmer; i've just found the documentation for the classic API provided by the library(PyGtk).

This is the syntax for my function for every method i've in my modules:

def Continua_Button_clicked(self, widget, event, *args):

But is it correct?

How can i be sure i'll got the widget reference, the event that fired up the signal handler and the arguments of the event?

I'm a bit confused of what and how many arguments i'll got from each event, and how many arguments my signal handler will get.

Bakuriu
  • 98,325
  • 22
  • 197
  • 231
FrancescoN
  • 2,146
  • 12
  • 34
  • 45
  • gtk.Widget Signal Prototypes!! yeah this one, write an official reply so i can give you "the green tick", thanksss – FrancescoN Jan 21 '14 at 16:01

1 Answers1

0

It depends on the signal what exactly is passed in; you'd consult the gkt.Widget signal documentation.

For example, the button-press-event signal expects:

def callback(widget, event, *user_params):

but child-notify will use:

def callback(widget, child_property, *user_params)

etc.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343