How to accept a drag&drop item?

Brian Yennie briany at qldlearning.com
Thu Aug 25 19:08:43 EDT 2005


Csaba,

Well, you can do it with two lines of code, or none =).

If you use an unlocked text field, it just works by default. I drag a 
link from FireFox to an editable field, and the URL appears.

If you have a different kind of object receiving the drag, you can do 
something like this:

on dragEnter
   set the acceptDrop to TRUE
end dragEnter

on dragDrop
   put the dragData["text"] into fld "myURL"
end dragDrop

If you look in the docs under "dragDrop" and all of the related terms, 
it should spell things out quite nicely.

- Brian




More information about the use-livecode mailing list