[gtkada] [gtkaa] more on row_activate for tree views
Juan L. Freniche
fdesp87 at gmail.com
Fri Jun 24 20:32:22 CEST 2011
Hello,
I have the following program (only the relevant parts are included):
...
package Treeview_Callback is new Gtk.Handlers.Callback
(Gtk_Tree_View_Record);
...
Treeview_Callback.Connect (My_Treeview, "row_activated",
On_Row_Activated'Access);
...
procedure On_Row_Activated (Treeview : access Gtk_Tree_View_Record'Class;
Params :
Glib.Values.GValues)
is
Path_String : constant String := Get_String (Nth (Params, 1));
Model : Gtk_Tree_Store;
Iter : Gtk_Tree_Iter;
...
begin
Model := Gtk_Tree_Store (Get_Model (Treeview));
Iter := Get_Iter_From_String (Model, Path_String);
...
end On_Row_Activated;
When I double-click on a row, the Path_String is
(gdb) print path_string
$11 = "["04"]"
Same for any row I double-click.
Obviously such path_string is not a path and an error is raised at the
obtention of Iter.
Any help? Thanks in advance,
JLF
More information about the gtkada
mailing list