How do I allow objects "accept drops"

Questions about GP commands and how to do things

Moderator: MSandro

Post Reply
MrSteve
Posts: 61
Joined: Jun 16th, '16, 01:22

How do I allow objects "accept drops"

Post by MrSteve » Jun 30th, '16, 20:29

I am trying to re-write the DragNDropList widget. I would like to be able to have it accept any object dropped onto it (similar to "accept drops" in Etoys).

So two questions:

1) How can I detect another object being "dropped" onto the my widget?

The thought being then add the dropped object to my widget's parts using:

Code: Select all

self_addPart (id <object dropped>)
Then once I add that "part" the next question is how to I move it? The existing "Motion" blocks only seem to allow sending to "this".

2) Is there a way to create "droppable behaviors?"
Ie: I could implement what I want by allowing certain behaviors to be dropped onto to other objects.

Post Reply