[VM: Squeak 3.0 (release build 1); Image: Squeak3.0final]
I want a to copy a morph when I start dragging (a la Mac/Windoze Finder/Explorer).
In my #startDrag:, I'm doing: event hand grabMorph: self veryDeepCopy
If I drag a copy from within an AlignmentMorph, the new copy is attached to the HandMorph as I'd expect, with the cursor arrow tip directly on the morph..
But if I put the AlignmnentMorph in a ScrollPane, the new copy is dragged, but offset from HandMorph (ie cursor tip is far away from morph it is dragging). The offset appears to correspond to the offset of the ScrollPane from the top-left of the world.
After inspecting I see that the ScrollPane and TransformMorph have bounds appropriate to their position within the world, and the AlignmentMorph has a topLeft of 0@0.
So: 1. Am I creating a new copy of the morph in the right way? (Dragging the original works fine.) Should I be instantiating a new morph from scratch?
2. How do I get it to work?!
3. Which component should (really) be responsible for adjusting a morph's position when changing coordinate systems?
Many thanks in advance! Cheers, Pete
---- Peter Munro
squeak-dev@lists.squeakfoundation.org