progrium/darwinkit

Feature request: NSPasteBoard.setData

Closed this issue · 1 comments

Requesting binding for setData as defined here: https://developer.apple.com/documentation/appkit/nspasteboard/1531214-setdata?language=objc.

Or I'd be curious to know what would be needed to implement it

After looking further I found that WriteObjects_ is available and works if ClearContents is called first.

Eg.

pb.ClearContents()
rtn := pb.WriteObjects_(core.NSArray_WithObjects(cocoa.NSImage_InitWithData(data)))