Re: segfault when reattaching a tree model to a tree view
Jacques Garrigue <[email protected]> Tue, 14 Sep 2010 16:36:12 +0900
| Newsgroups | gmane.comp.lang.ocaml.lib.gtk |
|---|---|
| Message-ID | <[email protected]> |
Dear Peter, I tried to do the same kind of thing with the tree_model.ml example, and I don't see any segmentation fault when setting the model again. Can you show some code. Also the version numbers of lablgtk and gtk, and the platform used, would be useful. Jacques On Tue, Sep 14, 2010 at 10:56 AM, Peter Groves <[email protected]> wrote: > Hi, > > I'm trying to speed up a tree view using the hints in the tutorial > found here: > > http://plus.kaist.ac.kr/~shoh/ocaml/lablgtk2/treeview-tutorial/ch03s03.html#sec-treestore-adding-many-rows > > My problem is slightly different than the one described in the > tutorial, however. I'm not replacing rows in the table but just > changing the values in a single column. The column is booleans in the > model and "cell_renderer_toggle" in the view, which basically means > that one of the columns in the table contains a checkbox for every row. > The slow performance occurs when I try to set the values of all the > checkboxes in a batch. I have also tried disabling sorting, but that > did not seem to make any difference. > > So now I'm trying to detach the model from the view while I do the > batch update, then reattach them. I'm able to detach the model from the > view using: > > - self.treeView#set_model None; > > - Then I update the model by using an 'iter' over all the rows in the > model. > > - Finally, I try to replace the model with: > self.treeView#set_model (Some(self.treeModel#coerce)); > > It segFaults on the last step. Are there any suggestions for what might > be going wrong or any way to debug this? > > Thanks, > Peter > > _______________________________________________ > Lablgtk mailing list > [email protected] > http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk >