On Sun, 2 Jun 2019 at 00:18, Markus Stumptner <
[hidden email]> wrote:
>
> I have been trying to replicate the behaviour of an existing (non-Pharo,
> non-Smalltalk) application with Morphic. This provides grouping images
> in a workspace, and then switching between laying them out separately or
> "stacked" by double clicking on the group (or an image in it). When the
> group is stacked, it can be moved around as a single drag and drop
> operation. When the group is separated, dragging an image out of it
> removes it from the group.
>
> On the surface this looked like a perfect fit to the submorph tree.
> Unfortunately, as both the Morphic chapter in Pharo by Example and the
> intro document by Maloney make clear, if you enable double clicking (by
> answering true to #handlesMouseDown:), you are interfering with what
> Maloney calls the "default behaviour" of being able to drag a Morph around.
>
> How do I reinstate that behaviour if a group is clicked on and the
> double click does not happen? Neither document helps in explaining where
> that "default" can be found in the code.
Have you put a `self haltOnce` in #handlesMouseDown: ?
I am far from an expert here, but the following may help:
Three alternate ways of handling mouse events
https://wiki.squeak.org/squeak/2477http://squeak.preeminent.org/tut2007/html/078.htmlCheck the Dragging section here...
https://wiki.squeak.org/squeak/6194Search for doubleclick here...
https://course.ccs.neu.edu/com3230/squeak/SqueakMorphClassGuide.pdfa few more #handlesXXX methods...
https://course.ccs.neu.edu/com3230/squeak/SqueakMouseControls.htmlcheers -ben