drag and drop problem.



To gtk team,

I´m developing an app with drag and drop operation between 2 treeviews and I have had some problems with dnd 
mechanism.

I do a G_VALUE_ARRAY to hold  the following selected datas. I was fulfill in signal ON_DRAG_GET.

Tabela is my gvaluearray and datas I wanna hold are, number of columns, name of columns, type of columns and 
datas of lines like below:

Number of columns(N), colname1, colname2, colname3,colname, ... ,colnameN,typeofcol1,typeofcol2, ... 
,typeofcolN, data1, data2, data3, ... , dataN

When a print values int to ON_DRAG_GET signal  I can see all values there. This structure is ready to copy to 
selectiondata.

I use the following command to put this gvaluearray into selectiondata.


gtk_selection_data_set(sdata,
            gdk_atom_intern ("gvaluearray_wetest", FALSE),
            4,              /* Tell GTK how to pack the data (bytes) */
            (void*)tabela,//(void*)&tabela,  /* The actual pointer that we just made */
            sizeof(tabela));

Into ON_DRAG_RECEIVED signal when I copy selection data with memcpy I have a surprise. Gtk selection has the 
same structure but data is empty. And only one data is copied and it is wrong. It is a genum.

What I´m doing wrong.

Thank you.
Ubirajara


As informações contidas nesta mensagem e nos arquivos anexados sao para uso exclusivo do destinatario aqui 
indicado e podem conter assuntos comerciais, de propriedade intelectual ou outras informações confidenciais, 
protegidas pelas leis aplicaveis.
Caso não seja o destinatario correto, por favor, notifique o remetente.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]