[squeak-dev] Re: Drag-drop in Morphic; updating old code

tim Rowledge tim at rowledge.org
Mon Jul 29 17:31:49 UTC 2013


Marcel, thank you so much for that. The picture adds a surprisingly useful amount of information.

I had got as far as working out the middle bit - dispatchCropEvent: /wantsDroppedMorph/wantsToBeDroppedInto - but hadn't at all noticed the rejectDropEvent/acceptDroppingMorph stuff. And I just really realised that dispatchDrop… actually runs through all the morphs in aMorph to check *everything* with them, in a way that at least seems to recurse all the way down. That could make for a very long process if dragging, say, a tree of script tiles. I think that if dropping a tree of similar morphs like that it should be ok to usurp rejectDropEvent, pass directly on to acceptDroppingMorph:event: and then just DroppedInto:event: Or, maybe, the smart thing is to use TransferMorph, which looks like it might just handle short-circuiting all that for you.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Oxymorons: Resident alien




More information about the Squeak-dev mailing list