I did a little more investigating and found a way to get the mouse handlers
to work:
        mvevt := MouseMoveEvent new 
                setType: #mouseMove 
                startPoint: ActiveHand position 
                endPoint: 1...@100
                trail: nil 
                buttons: 0 
                hand: ActiveHand 
                stamp: TimeStamp current.
                
        ActiveHand handleEvent: mvevt.

        evt := MouseButtonEvent new
                setType: #mouseDown 
                position: 5...@50 
                which: MouseEvent redButton 
                buttons: MouseEvent redButton 
                hand: ActiveHand
                stamp: TimeStamp current.
        
        ActiveHand handleEvent: evt.

The mouse move is necessary or the grabbed morph flies to wherever the hand
is, but even with this, if you touch the mouse after it's grabbed, it flies
there anyway.
-- 
View this message in context: 
http://forum.world.st/Programmatically-simulating-drag-and-drop-tp1752837p2122490.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to