From: pierric <w.p...@gm...> - 2008-08-22 13:29:32
|
Hi, everyone. In my current project, I use gtk2hs to build the GUI. But I meet a few problems. Following two is about the TreeView. 1. TreeView has a function named treeViewGetModel to achieve the TreeModel data. But there seems no way to covert this model into the concrete ones, such as TreeStore. This problem make the program a bit tougher, for I have to store the TreeStore somewhere. So I wonder why not just let the treeViewGetModel return the TreeStore structure? 2. I find updating the TreeStore is quite unefficient. On some occasion, I have to clear the whole treeStore and set a new forest which have over 80000 nodes. I update the treestore with following statements: do MV.treeStoreClear store mapM_ (uncurry $ MV.treeStoreInsertTree store []) (zip [0..] forest) I find that it method takes over 5 seconds, and over 150MB memory. This realy astonished me. Could someone point me a better way? Thank you very much, and best regards. pierric.wu |