ui.DragDrop.setBuffer
Set the text data of the dragged object.
Syntax
setBuffer(
buffer STRING )
- buffer is a string expression containing drag & drop data.
Usage
Use the setBuffer()
method to provide the text data of objects dragged from
the program to an external application.
The setBuffer()
method is typically used in an ON DRAG_START
block together with setMimeType()
.
By default, the dialog will serialize the data of the selected rows as a tab-separated list of values.
The text/plain MIME type is the default.
When using URI MIME types (for file paths for example), the string
returned from the getBuffer()
method can contain URL-encoded characters such as
%5E
, which represents the ^
caret. Therefore, you must URL-decode
strings returned from getBuffer()
with util.Strings.urlDecode()
. When
setting the drag & drop buffer content, if required by the front-end platform, the string can be
URL-encoded using util.Strings.urlEncode()
for setBuffer()
. However, URL-encoding
file paths for setBuffer()
is usually not required.