mwarning
Joined: 01 Apr 2007 Posts: 56
|
Posted: Mon Jul 14, 2008 2:47 pm Post subject: TreeView.getPathAtPos problems |
|
|
Hi,
the docs say that path, column, cellX and cellY can be NULL.
By looking at this source from TreeView, it will segfault.
I tried to create a dummy TreePath but it doesn't seem to have a usable constructor (does it serve as interface?).
Code: |
int getPathAtPos(gint x, gint y, inout TreePath path, inout TreeViewColumn column, out gint cellX, out gint cellY)
{
GtkTreePath* p = path.getTreePathStruct();
GtkTreeViewColumn* c = column.getTreeViewColumnStruct();
int result = gtk_tree_view_get_path_at_pos(gtkTreeView, x, y, &p, &c, &cellX, &cellY)
== 0 ? false : true;
path = new TreePath(p);
column = new TreeViewColumn(c);
return result;
} |
Any idea? |
|