GET PASTEBOARD DATA

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 11 (Modified)


GET PASTEBOARD DATA (dataType; data)

ParameterTypeDescription
dataTypeStringType of data to be extracted from pasteboard
dataBLOBRequested data extracted from the pasteboard

Description

The GET PASTEBOARD DATA command returns into the BLOB field or into the variable data the data present in the pasteboard and whose type you pass in dataType.

In dataType, pass a value specifying the type of data to be retrieved. You can pass a 4D signature, a UTI type (Mac OS), a format name/number (Windows), or a 4-character type (compatibility). For more information about these types, please refer to the Managing Pasteboards section.

Example

The following object methods for two buttons copy from and paste data to the array asOptions (pop-up menu, drop-downlist,...) located in a form:

      ` bCopyasOptions object method
   If (Size of array(asOptions)>0)  ` Is there something to copy?
      VARIABLE TO BLOB (asOptions;$vxClipData)  ` Accumulate the array elements in a BLOB
      CLEAR PASTEBOARD ` Empty the pasteboard
      APPEND DATA TO PASTEBOARD ("artx";asOptions)  ` Note the data type arbitrarily chosen
   End if

      ` bPasteasOptions object method
   If (Pasteboard data size ("artx")>0)  ` Is there some "artx" data in the pasteboard?
      GET PASTEBOARD DATA ("artx";$vxClipData)  ` Extract the data from the pasteboard
      BLOB TO VARIABLE ($vxClipData;asOptions)  ` Populate the array with the BLOB data
      asOptions:=0  ` Reset the selected element for the array
   End if
      

See Also

APPEND DATA TO PASTEBOARD, GET PICTURE FROM PASTEBOARD, Get text from pasteboard.

System Variables

If the data is correctly extracted, OK is set to 1; otherwise OK is set to 0 and an error is generated.

Error Handling

If there is not enough memory to extract the data, an error -108 is generated.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next