From: Axel S. <Axe...@en...> - 2009-02-12 18:31:21
|
On Feb 12, 2009, at 18:16, Peter Hercek wrote: > Jian Fan wrote: >> I have a program using tree view and crash if I enable search. I >> found >> the TreeDemo program has the same problem. I'm using XP and gtk2hs >> 0.10.0 and ghc 6.10.1. I just run TreeDemo.exe and then press any >> key: >> >> C:\Gtk2Hs\demos\treeList>TreeDemo.exe >> >> (TreeDemo.exe:5384): GLib-GObject-WARNING **: gtype.c:3940: type >> id `0' is inval >> id >> >> (TreeDemo.exe:5384): GLib-GObject-WARNING **: can't peek value >> table for type `< >> invalid>' which is not currently reference > > It may be worth to check whether it is not the same problem as this > one: > > http://permalink.gmane.org/gmane.comp.lang.haskell.gtk2hs/1273 > > Let us know whether it was the same. > There is a demo in demo/treeList/TreeSort.hs which demonstrates how to warp a model into a TreeModelSortable together with setting up column numbers to associate the sort columns to sorting functions. That said, SortColumnId's are quite different to ColumnId's. The first are plain numbers that are meant to create an association between columns and sorting functions. The latter are more complex number that associate a number with an extraction function. The problems you're seeing relate to ColumnId's. Could you send us your code? Axel. |