PYGTK: How can one add an argument to a callback?
- From: "Daniel B. Thurman" <dant cdkkt com>
- To: GTK Applications <gtk-app-devel-list gnome org>
- Subject: PYGTK: How can one add an argument to a callback?
- Date: Tue, 03 Nov 2009 09:46:29 -0800
The following code:
[...]
tvc.set_cell_data_func(cp, self.on_file_pixbuf)
[...]
def on_file_pixbuf1(self, column, cell, model, iter):
<code>
[...]
works fine, but what if I need to add another
argument to "self.on_file_pixbuf" without destroying
the arguments already supplied by the constructor?
For example, I want to do the following:
tvc.set_cell_data_func(cp, self.on_file_pixbuf1(t))
where 't' is another argument I wish to pass in
addition to that provided by the cell so that the
method results as:
def on_file_pixbuf1(self, column, cell, model, iter, t):
<code>
Thanks!
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]