ui.DragDrop.GetBuffer()

The GetBuffer() method is used to retrieve the data from the Drag and Drop buffer. You have to identify the current MYME type with the GetSelectedMimeType() method before you use GetBuffer(). The GetBuffer() method returns a string value and does not need any arguments.

 

You should remember that Drag and Drop data can be reached only during the ON DROP block execution, therefore, the GetBuffer() method can be used only in this block.

 

Here is an example of the MIME type manipulation functions usage:

 

 DISPLAY ARRAY pr_arr TO scr_arr.* ...

 ...

     ON DRAG_ENTER(dd)

       -- If the MIME type is unavailable, set operation to NULL

       CASE

       WHEN dd.selectMimeType("text/plain")

       WHEN dd.selectMimeType("text/uri-list")

       OTHERWISE

         CALL dd.setOperation(NULL)

       END CASE

 ...

     ON DROP(dd)

       -- Select MIME type and retrieve data from buffer

       LET s_row = dd.getLocationRow()

       CALL DIALOG.dropped_row("scr_arr", s_row)

       IF dn.getSelectMimeType() == "text/plain" THEN

         LET pr_arr[s_row].dragegdtext = dd.getBuffer()

       END IF

 ...

 END DISPLAY