Hi all,
I'm trying to translate one of my programs from Perl/Tk to Perl/Tkx. I
want to be able to paste a text string into the program using the middle
mouse button under X11.
I've been using "$string = Tkx::selection('get')", which works most of the
time. However, if there there is no current selection, I get an ugly
pop-up error.
I solved this problem in Perl/Tk with catch:
Tk::catch { $string = $g_w_main->SelectionGet(); };
I assume this is just a mapping to Tcl's catch. So, I can do:
$string = Tkx::catch('selection get');
However, this just sets $string to the result of catch, a number. How do
I get the results of the 'selection get' assigned to a Perl variable?
Thanks!
--
Ken Preslan <[email protected]>