From: Marc M. <mar...@gm...> - 2008-06-30 21:12:32
|
Hello, thanks again for your help, I looked up the Completion.hs file in http://darcs.haskell.org/gtk2hs/demo/treeList/ and it was just what I needed, now I can use the new ListStore also for a ComboBox, entry completion and as a CellComboBox box in a ListView. One side note I did not found Completion.hs in the demo folder of my expanded source tree although it was available on the demo website, it could be usefull that for the next release this is also included in the demo folder in gtk2hs-0.9.13.tar.gz Again thank you very much for your help Marc On Mon, Jun 30, 2008 at 10:03 AM, Axel Simon <Axe...@en...> wrote: > On Mon, 2008-06-30 at 08:58 +0200, Marc Mertens wrote: > > Hello, > > > > Actually you could specify in the documentation of ListStore and > > TreeList in Garphics.UI.Gtk.TreeList that these API is deprecated and > > refer to the correect location (I'm at work so I don't have the 9.13 > > documentation but I don't remember any note of deprecation). I had > > also some troubles of generating the documentation from sources (I > > used Haddock 2.0 and apparently you needed a older version of Haddock, > > after downgrading Haddock I managed to get the documentation. > > True, I don't think we looked into building docs with the new Haddock. > True again, our documentation should really say *don't use this*. > > > If I use either TreeStore or ListStore from > > Graphics.UI.Gtk..ModelView as you suggested, how can I ensure that the > > TreeModel nows that there are columns so that > > gtk_tree_model_get_n_columns does not return 0 (I think this causes > > the above exception), also if I use a ComboBoxEntry and set the text > > column with comboBoxEntrySetTextColumn, I can do this with ListStore > > of Graphics.UI.Gtk.TreeList but not with Graphics.UI.Gtk.ModelView (at > > least I do not know how to do this). > > The approach with the new API is very different and much easier (but you > need to forget how the C API works). > > Generally, you don't use column ids anymore. The simplest demo that > shows off how you build a list is in demo/treeList/ListDemo.hs . All the > other files use some sort of ColumnId but that's for advanced features > like special widgets (combo boxes, icon view), sorting or completion. > > Axel. > > > > Thanks a lot in advance and keep up the good work > > > > Marc > > Sun, Jun 29, 2008 at 10:48 PM, Axel Simon <Axe...@en...> wrote: > > > > On Jun 29, 2008, at 20:39, Marc Mertens wrote: > > > > Hello, > > > > searchModel<-GT.listStoreNew > > [TMstring] (GT is alias for Graphics.UI.Gtk) I get the > > compile error: > > > > > > Please make sure that everything you use is from > > Graphics.UI.Gtk.ModelView. If you use anything from > > Graphics.UI.Gtk.TreeList then you're mixing in some old API > > that is obsolete and will lead to broken programs. We will bin > > the old API with the next release, but for backwards > > compatibility we still have it around. Is there documentation > > we can improve? > > > > Axel. > > > > > > ------------------------------------------------------------------------- > > Check out the new SourceForge.net Marketplace. > > It's the best place to buy or sell services for > > just about anything Open Source. > > http://sourceforge.net/services/buy/index.php > > _______________________________________________ Gtk2hs-users mailing list > Gtk...@li... > https://lists.sourceforge.net/lists/listinfo/gtk2hs-users > > |