If I'm not mistaken, the docu is of a newer version and the type is from some older Gtk version where the C function actually did not return the insertion function but void. I think it depends on the oldest Gtk version, we want to support.
Axel On 21.12.2012, at 11:50, José Romildo Malaquias <j.romi...@gmail.com> wrote: > Hello. > > The documentation of treeStoreInsertForest is: > > > -- | Insert nodes into the store. > -- > -- * The given list of nodes is inserted into given parent at @pos@. > -- If the parent existed, the function returns @Just path@ where @path@ > -- is the position of the newly inserted elements. If @pos@ is negative > -- or greater or equal to the number of children of the node at @path@, > -- the new nodes are appended to the list. > -- > treeStoreInsertForest :: > TreeStore a -- ^ the store > -> TreePath -- ^ @path@ - the position of the parent > -> Int -- ^ @pos@ - the index of the new tree > -> Forest a -- ^ the list of trees to be inserted > -> IO () > > > Notice that it is mentioned that the function returns the position of > the newly inserted elements, although this is not the case. > > Can the function implementation be fixed so that it returns the > position, as documented? > > Without that information, it is not easy to work with newly inserted > nodes. > > I suppose the related functions treeStoreInsert and treeStoreInsertTree > have to be fixed too. > > Romildo > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > Gtk2hs-devel mailing list > Gtk2hs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Gtk2hs-devel mailing list Gtk2hs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel