Here is the situation:

I have two treeviews. I try to make a drag on the first one and a drop on the second one, in order to feed the second one with the data of the first one.

When i drop i have thos warning and i can't succed in putting the data in the second one.

GtkWarning: gtk_tree_view_scroll_to_cell: assertion `tree_view->priv->tree != NULL' failed TARGETS = [
           ('text/plain', 0, 0),
           ('TEXT', 0, 1),
           ('STRING', 0, 2),
           ]

       self.enable_model_drag_dest(TARGETS,gtk.gdk.ACTION_DEFAULT)
       self.connect("drag_data_get", self.drag_data_received_cb)

def drag_data_received_cb(self,treeview, context, x, y, selection, info, timestamp):
       drop_info = treeview.get_dest_row_at_pos(x, y)
       if drop_info:
           model = treeview.get_model()
           path, position = drop_info
           data = selection.data
           print data
       return

Can anyone help me please?
Thanks a lot,
Philippe Collet

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to