Drag and Drop problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Drag and Drop problem

FrankBz
Hello everyone, I would like to have a Morph which according to different colored morphs dragged into it, responds with different actions. For example, if the dragged morph is blue, the container morph should change its background color, otherwise it should do nothing.
So far I was able to have a container Morph which accepts morphs and repels certain colors.
How can I also specify that the container Morph does something (say, calls a method) once a specific colored morph has been dragged into it?  

Thanks in advance
Reply | Threaded
Open this post in threaded view
|

Re: Drag and Drop problem

Bert Freudenberg
On 20.03.2010, at 20:47, FrankBz wrote:

>
>
> Hello everyone, I would like to have a Morph which according to different
> colored morphs dragged into it, responds with different actions. For
> example, if the dragged morph is blue, the container morph should change its
> background color, otherwise it should do nothing.
> So far I was able to have a container Morph which accepts morphs and repels
> certain colors.
> How can I also specify that the container Morph does something (say, calls a
> method) once a specific colored morph has been dragged into it?  

Override #acceptDroppingMorph:event:.

- Bert -


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners