Re: SimpleList drag and drop

On Wed, 20 Sep 2006 07:20:19 +0200
"Ratcliffe, Jeffrey (Peters)" <Jeffrey Ratcliffe External eads com> wrote:

Hi, I'm no expert on this, but read "perldoc Gtk2::Widget" for the
drag-n-drop callbacks.

I did (honestly!)

Yeah, the docs are hard to grasp.
Check out
for a good overview.

Usually, you don't drop onto the same widget, but for your example

$slist->signal_connect("drag_drop" => sub { warn "dropped\n";  } );

OK. That certainly gives me a dropped signal. But somehow the timing with the update of the tied data array 
is out. 

For the attached code, at the dropped signal, the array is still in its original order. Only when pressing 
the button (or redoing the drop) is the new order displayed.

Any ideas?

Your script works for me, the order changes immediately on a drop.
Maybe you need a newer version of Gtk2?
I'm running Glib-1.120  and  Gtk2-1.121

Maybe you could put a 
Gtk2->main_iteration while Gtk2->events_pending;
in your callback?


I'm not really a human, but I play one on earth.

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