id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
1163,Return type of treeModelSortGetModel,guest,somebody,"Hi. I'm not totally sure what I'm talking about, but it seems to me that the return type of treeModelSortGetModel should be TypedTreeModelClass a rather than a generic TreeModel.

{{{
treeModelSortNewWithModel :: (TreeModelClass (childModel row), TypedTreeModelClass childModel) => childModel row -> IO (TypedTreeModelSort row)
}}}

Creates a new TreeModelSort, that will be a sorted view of the given model.
Methods

{{{
treeModelSortGetModel :: TreeModelSortClass self => self -> IO TreeModel
}}}
Returns the underlying model the TreeModelSort is sorting. 


I'm having problems getting the currently selected row.

{{{
showSelectedProgramme ref = do
  xml <- liftM stXML $ readIORef ref
  view <- xmlGetWidget xml MV.castToTreeView ""programmeTreeView""
  model' <- MV.treeViewGetModel view
  case model' of 
    Nothing -> return ()
    Just model -> do
      rawmodel <-  MV.treeModelSortGetModel model
      (path, col) <- MV.treeViewGetCursor view
      iter' <- MV.treeModelGetIter model path
      case iter' of 
        Nothing -> return ()
        Just iter -> do
          cIter <- MV.treeModelSortConvertIterToChildIter model iter
          p <- MV.treeModelGetRow rawmodel cIter
          displayProgrammeDetail ref p
}}}

(where ref is an IORef)

The following line is erroring {{{p <- MV.treeModelGetRow rawmodel cIter}}} since there doesn't seem to be a way of converting rawmodel to a typed ListStore.
",defect,closed,normal,,"general (Gtk+, Glib)",0.9.12,invalid,,
