drag and drop reordering of a list
i have a list of numbers [1 5 8 4 9 56 ]
zl nth will do anything but i would love to reorder them with a graphic interface
anything out there?
i would create the whole drag and drop thing using the [lcd] object for mouse tracking.
it will be a bigger patch, but such things are always a great training, and its result will
reusable for the next application.
-110
or acctually not a bigger patch when i think about it, drag and drop is pretty easy .. wait for mousedown, see at what position we are, wait until mouse is released, see at what position we are, trigger appropiate action.
dono, cellblock handles most of that internally
would be nice to have a bit of matrixctrl in jit.cellblock
like having more then one cell selected + list output in row/coll
I have devised this method for a drag and drop with jit.cellblock and coll. Note that it updates only on MouseUp.
It is probably what Roman suggested.
(Drag the rows with mouse)
@Nikola, your patch was super helpful, thanks! I modded it to only swap on dragging, looks a little more like spaghetti now heh.
Very ingenious, Nikola! But why the trigger after the join with its unconnected '1' outlet?
I built this to reorder MIDI playlists, but it should work on any list fed to the coll (using listfunnel, for instance).