new Clipboard every time?

Just get this issue, the code:

Dim text1 As String = "This is the first item being put on the clipboard!" Dim text2 As String = "This is the second item being put on the clipboard" Dim c As New Clipboard c.Text = text1 c.Text = text2 // Overwrites first text c.Close
works great on Windows and Linux but not on Mac. <https://xojo.com/issue/53597>

You can add:

#If TargetMacOS Then c = New Clipboard #EndIf
before the second c.Text, that way the clipboard will be empty/new before trying to replace the text in clipboard.

To be clear, it will not be empty. It will contain the contents of the clipboard at the time it was created.

Thank you Tim, you are right, sorry for the wrong information (I can’t edit it anymore).