Error getting tags :
error 404Error getting tags :
error 404 dragData | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Expander triangle

set the dragData to textToDrag

set the dragData[dataType] to dataToDrag

Platform Support
MacOS,Mac OS X,Windows,Linux
None required
Specifies what data is being dragged during a drag and drop.

set the dragData["html"] to the htmlText of field 1
get URL the dragData["text"]

Additional Comments
Expander triangle

Use the dragData property to find out what is being dragged or to change the data being dragged during the drag.


The dragData is an array with one or more of the following elements:

- text Plain text in the native encoding to the platform (MacRoman on Mac OS X, Windows-1252 on Windows and ISO8859-1 on Unix)

- html The styled text being dragged, in the same format as the htmlText

- rtf The styled text being dragged, in the same format as the RTFText

- Unicode The text being dragged, in the same format as the unicodeText

- image The data of an image in PNG, JPEG or GIF format

- files The name and location of the file or files being dragged, one per line

- styles Styled text in Revolution internal styled text format

- private An arbitrary application-defined string. This format will only be visible within the same Revolution process

(i.e. when the current application is acting as source and target for the current drag-drop operation)


If Revolution is acting as the target of a drag-drop operation (i.e. during the context of a dragEnter, dragMove, dragDrop or dragLeave message), the dataData property can be queried for the data the source application is offering.

Setting a type of data during a mouseDown or dragStart handler will cause a drop-drop operation to commence when the handler finishes. Only one type of data can be set at once, although Revolution will automatically convert between all the text formats.

You can query the keys of the dragData to find out what data types are available.

Which elements are present in the dragData array depends on what type of data is being dragged. It is possible for more than one element in the dragData array to be populated. Different drop destinations can each use the data type they need. (For example, a list field's dragDrop handler might use the dragData["text"] to ignore the styles, , while an ordinary field's dragDrop handler might use the dragData["HTML"] to retain the styles.

Revolution will automatically synthesize the three text properties text, html and rtf if any text data is present. For example setting the dragData["text"] will result in the dragData["html"] being set appropriately.

If you don't specify a dataType, the dragData property reports or sets the dragData["text"].

Note: It is necessary to use double quotes around the keys of the dragData array because some of the key names (such as "files") are Revolution reserved words. Quoting array indexes (other than integers) is a good practice anyway, but in the case of this property, it's necessary to avoid script errors.

User Comments
Expander triangle
User thumbnail
Oct 18, 2010
If you are trying to dynamically change the dragData["files"] on dragEnter (perhaps to filter the selected files), you can't. It is read-only. You will have to implement your own variable or custom property to store the modified list for use on dragDrop instead.