Help with repel in drag and drop

Stephane Ducasse ducasse at iam.unibe.ch
Sun Feb 16 16:46:02 UTC 2003


THANKS.
I was sure that there was some magic but I was impossible to get it.
I tried to check all the sender of grabMorph without success.

Thanks again.

Hi documenters guys I attached the code chosing how to make the repel 
works in my
context.

Stef


On Sunday, February 16, 2003, at 05:38 PM, Bob Arning wrote:

> On Sun, 16 Feb 2003 16:40:58 +0100 Stephane Ducasse 
> <ducasse at iam.unibe.ch> wrote:
>> Here my question:
>> -  only when I put a self halt before a call to
>> evt hand grabMorph: evt in the method rejectDropMorphEvent: evt below.
>> I'm sure that I'm missing an important invocation but cannot figure 
>> out
>> which one.
>>
>> Thanks in advance for magic powder.
>
> The HandMorph has some logic that makes sure it is not left holding 
> the dropped morph. The following method works around that.
>
> Cheers,
> Bob
>
> 'From Squeak3.4beta of ''1 December 2002'' [latest update: #5138] on 
> 16 February 2003 at 11:36:34 am'!
>
> !DroppedMorph methodsFor: 'dropping/grabbing' stamp: 'raa 2/16/2003 
> 11:36'!
> rejectDropMorphEvent: evt
>
> 	| h |
>
> 	h _ evt hand.
> 	WorldState addDeferredUIMessage: [h grabMorph: self].
> 	evt wasHandled: true.
> ! !
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DragAndDropRepel.3.cs
Type: application/text
Size: 1636 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030216/3dd0fc96/DragAndDropRepel.3.bin
-------------- next part --------------

>
Prof. Dr. St?phane DUCASSE (ducasse at iam.unibe.ch) 
http://www.iam.unibe.ch/~ducasse/
  "if you knew today was your last day on earth, what would you do
  different? ... especially if, by doing something different, today
  might not be your last day on earth" Calvin&Hobbes




More information about the Squeak-dev mailing list