jeeze not being able to just reply is a pain anyhow.... I looked into using treemodels connecting to databases
from what I could tell it seems to initially iterate all items and either copies them or creates meta data about the items (I didnt look into the implementation) Depending on how things were added it would also seem to iterate the whole set again! I think the standard treemodel is ok for small numbers (sub 200) but I had to end up paging 1,000's of items 100 at a time (interestingly this is what the gnome db widgets do...) I've been tempted to weld together my own data grid with a viewport and moving entry widgets but this would at a guess need C and I haven't had the time to look into it --- On Thu, 18/6/09, Gerald Britton <[email protected]> wrote: > From: Gerald Britton <[email protected]> > Subject: [pygtk] gtk.TreeModel.iter_children() method, how often should it be > called? > To: [email protected] > Date: Thursday, 18 June, 2009, 2:50 PM > Hi -- I think I have a problem but > I'm not sure since I'm relatively > new to the TreeModel and how it works. Here's the > scenario: > > I use TreeModel to display rows of data from a > database. Upon > startup, the TreeModel is built and I notice two calls to > the > gtk.TreeModel.iter_children() method. Later, I change > some data in > one of the rows. The next time the TreeModel is > built, > gtk.TreeModel.iter_children() is called thousands of times > before the > display is refreshed. Oh, the database has less than 50 > rows of data > in it! > > So, two questions: > > 1. Is this normal (I hope not!) behavior? > > 2. What tells the TreeModel to stop calling > gtk.TreeModel.iter_children()? How does the TM know > that it has done > everything it needs to do? > > -- > Gerald Britton > _______________________________________________ > pygtk mailing list [email protected] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://faq.pygtk.org/ > _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
