Clipboard in version 4.0

J. Landman Gay jacque at hyperactivesw.com
Wed Oct 13 11:48:41 EDT 2010


On 10/13/10 9:57 AM, Jonathan Lynch wrote:

> I recently experimented with upgrading to 4.0, but was not succesful. It
> turns out that version 2.6.1 can access items from the clipboard that 4.0
> cannot access. Two things happen - for copying from some webpages, the
> clipboard appears empty in 4.0 but has content (HTML information) in 2.6.1.
> The second problem is that for copying from some webpages, the text portion
> of the clipboard is populated with html information in 4.0, but is populated
> properly with straight text in 2.6.1.

The clipboard function was changed some time ago to specifically return 
different aspects of its content. It's now an array. You can retrieve 
the content in any specified format that the content may contain. There 
is more in the dictionary, but for text:

  the clipboardData["html"] -- gives the html content
  the clipboardData["text"] -- gives plain text content

There are other options too. If you use the function without specifying 
an array element, plain text is returned as the default if it exists.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list