FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TreeView.getPathAtPos problems

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
mwarning



Joined: 01 Apr 2007
Posts: 56

PostPosted: Mon Jul 14, 2008 2:47 pm    Post subject: TreeView.getPathAtPos problems Reply with quote

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?
Back to top
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Mon Jul 14, 2008 3:54 pm    Post subject: Reply with quote

Fixed in svn r536
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group