<div dir="ltr"><div dir="ltr">Is anyone interested in reviewing this? I still have it in my image, making Morphic dirty, hampering Monticello backports in that package.</div><div dir="ltr"><br></div><div>The attachments are still here: <a href="http://forum.world.st/Drag-and-drop-to-reorder-items-in-a-single-list-td5082943.html">http://forum.world.st/Drag-and-drop-to-reorder-items-in-a-single-list-td5082943.html</a></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On 2018-08-14T14:50+02:00 Jakob Reschke <<a href="mailto:forums.jakob@resfarm.de">forums.jakob@resfarm.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello everyone,<br>
<br>
tl;dr: the current PluggableTextMorph/Plus does not support the<br>
reordering of items in a single list via drag and drop. Attached you<br>
find a change set that fixes this, but it might also break in other<br>
places. Thus, I kindly ask for a review.<br>
<br>
Today I found myself implementing a ToolBuilder-built list in which<br>
the items should be reorderable via drag and drop. Unfortunately, the<br>
current implementation of PluggableTextMorph/Plus does not allow this:<br>
you first have to drag the item out of the list before you can drop it<br>
in again.<br>
<br>
Seems like the list morph needs the mouse focus to be able to accept<br>
the drop. However, the current implementation explicitly releases the<br>
focus from the list upon grabbing the item.<br>
<br>
Then I changed the PluggableTextMorphPlus to not drop the focus, but<br>
keep it, when starting to drag an item. Now the focus would not even<br>
be released anymore when the item was indeed dragged out of a list if<br>
that list itself does not accept any drops (such as the method list in<br>
the system browser: it does not accept drops, but the methods can be<br>
dragged from it to the message categories list). So I have changed<br>
further methods to make the list morphs always handle dragging events,<br>
even if they are not interested in drops.<br>
<br>
But I do not know what else that might have broken. So, please have a<br>
look at the attached change sets. The one without "all" in the file<br>
name contains only the actual changes. The one with "all" also<br>
contains other relevant (unchanged) methods that I touched during my<br>
investigation. Eventually, I would like to put this or a revised<br>
edition of it in the inbox because list reordering via drag and drop<br>
should not be impossible.<br>
<br>
The third file contains a simple Model subclass with a list whose<br>
items should be reorderable via drag and drop, so you do not have to<br>
write it yourself. Grab a sample instance and open it with the<br>
ToolBuilder:<br>
<br>
    ToolBuilder open: DragDropInSingleList new.<br>
<br>
In case I simply got it wrong and there is no need to change Morphic<br>
lists to achieve what I want, please tell me how to do it right. ;-)<br>
<br>
Best regards,<br>
Jakob<br>
</blockquote></div></div>