[squeak-dev] HandMorph etc #grabTransform

tim Rowledge tim at rowledge.org
Thu Jan 7 01:06:06 UTC 2016


A solution to at least part of my last-month problem -
> > b) dropping doesn’t work the same - you have to drop the morph and then click-release again to get it to actually drop. That part really confuses me right now.

It seems that the test at the top of HandMorph>dropMorph:event: fails because the default implementation of #shouldDropOnMouseUp expects a non-nil result from #formerPosition. A TransformationMorph that has been added as a flexShell has no such property and so trying to drop (as part of a mouse-up) something wrapped in one will always fail.

My best suggestion is to over-ride shouldDropOnMouseUp in TransformationMorph as
^self hasProperty: #addedFlexAtGrab
It seem to work for my case so far, which is nice. Now maybe I can work out why it drops the damned morph in the wrong place...

Any other ideas on a good way to do this?

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- Talks to plants on their own level.




More information about the Squeak-dev mailing list