Hi everyone,

I am new to this mailing list. I am working on a program to perform data
analysis in python. This program is based on a library already developped,
that uses pygtk to create data-handling objects.
This data object inherits from gobject.GObject, and defines a few signals
"new-data-point".

I would like to connect this signal to a few functions, specifying the
arguments of these functions. I have read the PyGTK webpage (
http://www.pygtk.org/docs/pygobject/class-gobject.html#method-gobject--connect),
which specifies that i just have to concatenate in the "connect" call the
arguments: "object.connect("signal_name",handler,arg1,arg2,arg3)

I therefore have written:

data.connect("new-data-point", handler,'text')


and defined the handler function as suggested: def
handler(object,arg1,arg2,arg3)

def handler(data,argument):
    print data
    print argument

However, when i do execute the "connect" function, i get the error message:
"connect takes exactly 3 arguments (4 given).

Could you tell me how i could then specify arguments for the functions to
be called when the signal is given ?

Bests,

Pierre
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to