Statement macro
Evaluates a body of code with a clipboard grabbed.
with-clipboard (clipboard = sheet) body end
duim-sheets
duim-sheets
Evaluates body with the clipboard grabbed, returning the results to the clipboard.
The macro grabs a lock on the clipboard, using open-clipboard, and then executes body. Once the results of evaluating body have been sent to the clipboard, the clipboard lock is freed using close-clipboard. The clipboard argument is a Dylan variable-namebnf used locally in the call to with-clipboard. The sheet argument is a Dylan variable-namebnf that evaluates to the sheet associated with clipboard.
This macro is the easiest way of manipulating the clipboard from DUIM, since it removes the need to create and destroy a clipboard lock yourself.
You can add more than one format of your data to the clipboard within the scope of this macro. So, for example, you could place an arbitrary object onto the clipboard, for use within your own application, and a string representation for other tools applications to see.