Re: How to implement custom interfaces in derived TreeModelSort ?



Hi Torsten,

> Maybe you forgot to call
> enable_model_drag_source or enable_model_drag_dest?

No, I was doing that [1].

> The following code,
> adapting from an old thread on this list*, works for me:

Thanks for this working example !  I was able to spot the difference with mine: how you create the "sorted model".

I was doing:

my $model_sort = MyTreeModelSort->new_with_model($model);

while you created your own constructor !

After I changed the above line with:

my $model_sort = MyTreeModelSort->new(model => $model);

all suddenly worked as expected...
(see attached for the complete code)

Both lines are supposed to do the same, aren't they ?
If I read Gtk3.pm correctly, "new_with_model" is calling "sort_new_with_model" in "TreeModel" ; is this still correct ?

In any case, thanks a lot for your answer and your so valuable help !

Wish you a wonderful night.

  Gaëtan


[1] See code attached to https://mail.gnome.org/archives/gtk-perl-list/2020-May/msg00007.html

Attachment: test-dnd3.pl
Description: Perl program



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