[squeak-dev] Morph dragging code?

Chris Muller asqueaker at gmail.com
Sun Jan 5 22:40:51 UTC 2014


There are several examples in the image, did you look at references to
TransferMorph?

Maui uses drag-and-drop extensively, you can load it from SqueakMap.

IIRC, it follows the same pattern as the other event-handling methods
of Morphic.  There is one that returns a boolean establishing
permission to respond to that event (e.g., #handlesMouseOverDragging
and #handlesMouseEnterDragging) and, if true, calls the corresponding
handler method(s) (#mouseEnterDragging, #mouseLeaveDragging).

On Fri, Jan 3, 2014 at 5:41 PM, tim Rowledge <tim at rowledge.org> wrote:
> I’m trying to assemble a decent understanding of how the Morphic drag & drop works in order to write a reasonable tutorial and other doc for the swiki. I haven’t found anything notably helpful in the image and obviously not on the swiki or I wouldn’t be needing to write this... for the swiki.
>
> My hope is to use a version of the old Plumbin’ example as a hook to hang things upon; I want to make a morph to act as the source of tiles, another as the playing field and of course the tiles. As previously mentioned ,there are a couple of versions of gamified Plumbin’ around but they don’t seem to me to be good vehicles for a tutorial. I want to keep it as simple as plausible and to make sure it is understandable without needing too many other aspects of the system in the reader’s head. Or mine, for that matter!
>
> Marcel helped me start off down the drop related trail a few weeks ago with a superb quick overview that has been very helpful. I have a nice couple of initial examples for dealing with dropping that don’t need any coding at all, which is nice as a starting point.
>
> Unfortunately the drag related stuff seems a lot less organised. I see the #dragEnable & similar methods, the #startDrag: stuff and the rather inelegant PasteUpMorph>mouseDown: code but nothing seems to hang together to make a clean story yet. What am I missing? Is there any documentation that I simply haven’t stumbled across? A really good example already out there?
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Bad command or file name.  Go stand in the corner.
>
>
>


More information about the Squeak-dev mailing list