@d-healey I thought in this case the parameter is the address for the data "this.data.test" being a path, not the actual data.
So I was thinking the path variable is static, but it is just rewriting the contents at that path.
Anyway, I fixed it by using .getValue() and .setValue():
p.set("allowCallbacks", "All Callbacks");
p.setMouseCallback(function(event)
{
altDragAndDrop();
});
inline function altDragAndDrop()
{
// show "+" cursor when alt/option is pressed
local cursor;
event.altDown ? cursor = "CopyingCursor" : cursor = "NormalCursor";
this.setMouseCursor(cursor, Colours.white, 1);
// alt/option drag copies to clipboard
if (event.drag && event.altDown)
{
Clipboard = this.getValue();
}
// releasing the mouse on a panel copies the clipboard to the panel, then clears the clipboard
if (!event.clicked && event.altDown && this.getValue() != Clipboard && Clipboard != undefined)
{
this.setValue(Clipboard);
this.repaint();
Clipboard = undefined;
}
};