Re: PYGTK: How can one add an argument to a callback?

2009-11-03 Thread finlay
> > The following code: > > [...] > tvc.set_cell_data_func(cp, self.on_file_pixbuf) > [...] > def on_file_pixbuf1(self, column, cell, model, iter): > > [...] > > works fine, but what if I need to add another > argument to "self.on_file_pixbuf" without destroying > the arguments already supplie

Re: Invalid GtkTreeIter

2009-11-03 Thread Claudio Saavedra
El mar, 03-11-2009 a las 16:53 -0500, dhk escribió: > I have a program that declares a number of GtkTreeIter's. Recently the > prepending to the parent iter broke. I found out that, in some cases, > the stamp to the iter's are negative just after the iter is declared. > This means the iter is inv

Invalid GtkTreeIter

2009-11-03 Thread dhk
I have a program that declares a number of GtkTreeIter's. Recently the prepending to the parent iter broke. I found out that, in some cases, the stamp to the iter's are negative just after the iter is declared. This means the iter is invalid. The following test program does the same thing. Why

Re: PYGTK: How can one add an argument to a callback?

2009-11-03 Thread Daniel B. Thurman
On 11/03/2009 10:35 AM, Lars Wirzenius wrote: > On Tue, 2009-11-03 at 09:46 -0800, Daniel B. Thurman wrote: > >> 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 b

PYGTK: How can one add an argument to a callback?

2009-11-03 Thread Daniel B. Thurman
The following code: [...] tvc.set_cell_data_func(cp, self.on_file_pixbuf) [...] def on_file_pixbuf1(self, column, cell, model, iter): [...] 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?

Re: PYGTK: How can one add an argument to a callback?

2009-11-03 Thread Lars Wirzenius
On Tue, 2009-11-03 at 09:46 -0800, Daniel B. Thurman wrote: > 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_f

Re: g_object_get_data Programmer error

2009-11-03 Thread Florian Müllner
El mar, 03-11-2009 a las 07:39 -0800, Steve Harrington escribió: > I am trying to use g_object_get_data() to retrieve the GtkWidget * of an > object. Seems simple enough but The attached code doesn't work. I must > have missed something simple but darned if I can see it. Indeed - g_object_get_

g_object_get_data Programmer error

2009-11-03 Thread Steve Harrington
I am trying to use g_object_get_data() to retrieve the GtkWidget * of an object. Seems simple enough but The attached code doesn't work. I must have missed something simple but darned if I can see it. All help appreciated. /* * This program is free software; you can redistribute it and/or *