Hi Sean,
You don't have to use the ACTIVE hand. Any hand will do.
e.g.
artificialHand = HandMorphForReplay new .
You will have to play and look at the classes. I haven't ever tried this. So I don't know if this particular solution will work. It should be close.
Worse comes to worse you could base an ArtificialHand class on HandMorphForReplay and make something that worked to your requirements.
Happy hunting.
Yours in curiosity and service, --Jerome Peace
--- On Sat, 5/1/10, Sean P. DeNigris sean@clipperadams.com wrote:
From: Sean P. DeNigris sean@clipperadams.com Subject: [Newbies] Re: Programmatically simulating drag and drop To: beginners@lists.squeakfoundation.org Date: Saturday, May 1, 2010, 10:10 PM
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: 100@100 trail: nil buttons: 0 hand: ActiveHand stamp: TimeStamp current. ActiveHand handleEvent: mvevt.
evt := MouseButtonEvent new setType: #mouseDown position: 50@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-tp1752837p21... 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