Passing Named Pipe to Function
- From: Daniel Davidson <danield igb uiuc edu>
- To: gtk-perl-list gnome org
- Subject: Passing Named Pipe to Function
- Date: Fri, 03 Feb 2006 16:16:58 -0600
I figured someone here would know, so here goes. I am trying to
simplify my progress bars by making a single function that would handle
them. Here is what I am trying to do:
pipe($mainfractread,$mainfractwrite);
pipe($mainprogread,$mainprogwrite);
.
.
.
$mainprogresstab = Gtk2::Helper->add_watch(fileno($mainprogwrite), 'in',
sub{updateprogressb(\$mainprogread,\$mainfractread,$mainprogressbar);});
However when the updateprogressb function runs, it dies because it seems
I am not referencing it correctly. The perl error is:
*** unhandled exception in callback:
*** Not a GLOB reference at ./gtk.pl line 119.
Other relevant lines of code before the error in the updateprogressb
function are:
my ($prog,$fract,$progressbar) = @_;
my $size = pack("L", 0);
ioctl($fract, FIONREAD(), $size) or die "Couldnât call ioctl: $!\n";
So how do I pass these?
thanks,
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]