Revolution automatically handles the mechanics of dragging and dropping text between and within unlocked fields. To support this type of drag and drop operation, you don't need to do any scripting: the text is deleted from the source field automatically when Revolution receives the dragEndmessage.

To prevent the dragged text from being automatically deleted from the source field when it's dropped onto another unlocked field, trap the dragEndmessage. If you don't want text from a particular field to be deleted after dragging, place a dragEnd handler in the field that does not contain a pass control structure:

on dragEnd -- in script of field or one of its owners

-- do nothing, but trap the message

end dragEnd

On the other hand, if you want to perform some action when text is dragged from an unlocked field and then dropped, you need to pass the dragEndmessage once you're done with it in order to allow the deletion to take place:

on dragEnd

set the textColor of me to "gray"

pass dragEnd -- needed for text removal to occur

end dragEnd

To make changes to the original data in a locked field or a control other than a field when a drop is completed, handle the dragEnd message. For these objects, if you want the dragged data to be removed (or changed), your dragEnd handler must delete the dragged text from the source object (or perform whatever action you want to do on a drop); the behavior is not automated as it is for unlocked fields.