Hi,
I've made a small addition to Roassal, so now we can drop morphs onto Roassal canvas
and then do something with it.
For example open a view:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
v := RTView new.
v @ (RTMorphDropInteraction new
if: [ :morph :event | morph isTransferable and: [ morph passenger isNotEmpty ] ]
do: [ :morph :event | |el|
el := (RTLabel new elementOn: morph passenger first).
el @ RTDraggable.
v add: el.
v signalUpdate.
]).
v open.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
And then drag Class or Method from Nautilus window and it should appear in the canvas.
The interaction can be added to any shape (not just view), and the first (in terms of
elements placed on top of each other) shape/view that passes the #if: block will process
it (just like a click event).
Is this useful in Roassal itself? Should I keep it for myself? (The implementation is a
bit... hacky).
Peter