Subject: | Problem with SelectionGet |
Date: | Thu, 30 Apr 2009 14:05:45 +0200 |
To: | <bug-Tk [...] rt.cpan.org> |
From: | "K. Wittrock" <KWittrock [...] web.de> |
I type ctrl-C to bring a multiline Text to the clipboard and then use
$sel = $mainwindow->SelectionGet(-selection => 'CLIPBOARD');
to fetch it into my program. The retrieved Text is followed by some garbage characters. These consist of an ASCII NUL, followed by
the last characters of the text. The number of garbage characters equals the number of newlines in the text.
I can remedy this by adding
$sel =~ s/\0.*//s;
to my script, but I would prefer a solution within SelectionGet().
My software is Windows XP Home with SP3, ActivePerl version 5.8.8, and perl/Tk version 804.027.
Kind regards
Klaus Wittrock