hallvors/clipboard — comment on commit d793c9dcf7af64ad192a9979292c3efc68af6249
File:  line 0
By hallvors:

Hi Jan,
I'll add a couple of tests to let you see how this is meant to work in
practise. Very simple, stuff like

Clipboard.copy '

paragraph, formatted

', 'text/html'

Clipboard.paste # outputs 'paragraph, formatted'
Clipboard.paste 'text/html' # outputs '

paragraph, formatted

'

Clipboard.copy 'c:\test.tmp', 'file reference'
# Pasting in Windows explorer will now copy c:\test.tmp to current folder
Clipboard.paste 'file reference' # outputs 'c:\test.tmp'

I also need this to work on *nix systems (X11 clipboard implementation).
Seems a bit more complicated, since X11 needs (I think) to have a process
that is the "owner" of the clipboard and returns data on demand. So I
believe the script needs to fork a process that will be set as clipboard
owner and terminate itself when the system says it no longer owns the
clipboard. (Obviously your fluency in Ruby far exceeds mine :) so perhaps
you have some specific suggestions on how to do this).

I haven't looked at how to write a Mac implementation yet. Sorry, but
that's going to be lower priority for me personally, and I don't have a
Mac easily available to test on..

--
Hallvord R. M. Steen, Core Tester, Opera Software
http://www.opera.com http://my.opera.com/hallvors/