English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
lablgtk GTree problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-03-06 (00:31)
From: Jacques Garrigue <garrigue@m...>
Subject: Re: [Caml-list] lablgtk GTree problem
From: "Ewen Maclean" <E.Maclean@ed.ac.uk>

> let on_row_activated (view:GTree.view) nps path column =
>   let model = view#model in
>   let row = model#get_iter path in
>   let name = model#get ~row ~column:str_col in
>   uprint ("Double-clicked row contains name " ^ name) ()
> what I want is to work out is the integer index of row in the path. I read
> somewhere that I could use path#get_indices to return an array of integers
> which would tell me, but it tells me that path has no method get_indices.

Not surprising: a path is not an object :-)
You should use the function GTree.Path.get_indices.

Jacques Garrigue