Hi Piotr

2015-01-24 20:24 GMT+01:00 Piotr Klibert <piotr.klib...@10clouds.com>:

> Haha, ok, that's not exactly the answer I was hoping for, but well, I
> can't say it was a complete surprise ;-)
>
> I'll try grokking drag&drop implementation in Pharo next week and
> doing something with it. In my app I'm going to have one very long
> list as a source and a few other lists as destinations. To make it
> worthwhile I need to have support for dragging all items a current
>

The problem is, dragging stars after the mouse click on the list items
changes the selection. That means, selecting all items and after
that click on one item to start dragging, this item will be unselected.

You can select all but one item and then click AND drag the last item.



> selection and additionally a way to make selection non-continuous,
> essentially what most list widgets do with Ctrl+click.
>

This should work (justed test this with  a ListModel with multiselection
enabled)



>
> Any help appreciated!
>
>
> Best regards,
> Piotr Klibert
>
>
> 2015-01-24 19:52 GMT+01:00 stepharo <steph...@free.fr>:
> >
> > Le 24/1/15 18:27, Piotr Klibert a écrit :
> >>
> >> Hi,
> >>
> >> working towards my app I encountered another problem. It's about drag
> >> and drop support for lists in Spec and underlying Morphs.
> >>
> >> While multiple selection is well supported in PluggableListMorph,
> >> reading #startDrag: and #startDragExtended: led me to believe that
> >> there is no support for dragging a bunch of list elements at once.
> >
> >
> > The drag and drop support sucks. I'm sorry about it. But this is a
> reality.
> >
> >>   It
> >> looks like drag is always initialized for the element that was clicked
> >> (dragIndex := self rowAtLocation: evt position.) and I see no easy
> >> extension point for changing this to support dragging all selected
> >> items instead.
> >>
> >> Am I missing some methods or classes that would let me do this, or is
> >> this indeed not possible right now? How would I go about implementing
> >> it?
> >>
> >>
> >> Best regards,
> >> Piotr Klibert
> >>
> >>
> >>
> >
> >
>
>

Reply via email to