Glib::IO::add_watch doesn't work in Windows
- From: "Ye Wenbin" <wenbinye gmail com>
- To: gtk-perl-list gnome org
- Subject: Glib::IO::add_watch doesn't work in Windows
- Date: Thu, 08 Nov 2007 14:04:11 +0800
Hi,
The add_watch function seem not work in Windows. I test using
this script:
use Gtk2 '-init';
use Glib qw/FALSE TRUE/;
Glib::IO->add_watch(
fileno(STDIN),
'in',
\&callback,
\*STDIN,
);
Gtk2->main;
sub callback {
my ($fd, $cond, $fh) = @_;
my $line = <$fh>;
print "You just input $line\n";
return FALSE;
}
The script works in Ubuntu.
But in windows, seem the program is block in the mainloop, and
all inputs will appear in the command line after I press Ctrl-C.
--
Best regards.
Ye Wenbin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]