Custom TreeModel in PyGObject 3.2.2



Hi,

I'm trying to implement my own Gtk.TreeModel and I want to fetch data
from my sqlite-Database directly (i.e. not using append()).

This is my code so far:
http://pastebin.com/pzkz8PuF

If I run the program, I'm getting a Type Error in do_iter_next(),
because rowref is a TreeIter-object, which doen't support indexing.

But I can't change the code accordingly, because I do not know where my
original data is stored. I tried TreeIter.user_data, but it's None.

But if I rewrite do_get_iter, do_iter_next, etc. to return a
TreeIter-object with my tuple stored in user_data instead of returning
the plain tuple, I get this error:

ERROR:/build/buildd/pygobject-3.2.2/gi/pygi-closure.c:317:_pygi_closure_set_out_arguments:
code should not be reached

Any help appreciated!

Thanks,
Jan Holthuis

PS: Please CC to my e-mail-address, because I'm not a subscriber of this
mailing list.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]