Blah. I can't get it to work with DoOneEvent(), $mw->update(), or even $mw->idletasks(). :-(
The problem, as far as I can tell, is that it is not based on how many events are executed (though they need to be executed, otherwise the callback is never called) but, rather, on how long the program remains active. With the following code, it almost never works with $ARGV[0] = 1, sometimes works with 2, pretty much always works with 3, and is (presumably) guaranteed with 5 and above.
#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = MainWindow->new(); $mw->withdraw(); $mw->clipboardClear(); $mw->clipboardAppend('clip'); $mw->after($ARGV[0], [$mw, 'destroy']); MainLoop;
I don't suppose you have any ideas on how I could go about this in a way that doesn't seem so... well, kludgey?
bbfu
Seasons don't fear The Reaper.
Nor do the wind, the sun, and the rain.
We can be like they are.
In reply to (bbfu) (still not working; time based) Re2: (bbfu) (neither $widget-SelectionHandle()) Re: Tk::Clipboard and the X Windows Clipboard
by bbfu
in thread Tk::Clipboard and the X Windows Clipboard
by bbfu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |