For Programmers: Free Programming Magazines  


Home > Archive > PerlTk > September 2004 > Troubles with clipboard









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Troubles with clipboard
Felix Liberman

2004-09-02, 9:00 am

Hi All,

I got this snippet from my colleague. Similar issue already observed
in my own application but I gave up.

Maybe somebody can explain why X-clipboard remain unchanged?

#!/usr/bin/perl

use Tk;
$mw = MainWindow->new;
$mw->Button (-text=>"Done" ,
-command=>sub{$mw->clipboardAppend("hello");$mw->destroy;})->pack();

MainLoop;

~~~~~~~~~~~~~~~~~~~~~~~

Thanks in advance,

Felix.
Marc Dashevsky

2004-09-02, 3:58 pm

In article <2401730c.0409020418.69c9b151@posting.google.com>, felixl@rambler.ru says...
> I got this snippet from my colleague. Similar issue already observed
> in my own application but I gave up.
>
> Maybe somebody can explain why X-clipboard remain unchanged?


I'm not sure, since I've never used Tk::clipboard, but the pod
clearly says:

Tk::clipboard - Manipulate Tk clipboard

It doesn't mention anything about the X clipboard, just Tk's
internal clipboard. Perhaps Tk::Selection would be more useful?

> #!/usr/bin/perl
>
> use Tk;
> $mw = MainWindow->new;
> $mw->Button (-text=>"Done" ,
> -command=>sub{$mw->clipboardAppend("hello");$mw->destroy;})->pack();
>
> MainLoop;


--
Go to http://MarcDashevsky.com to send me e-mail.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com