Re: need help in tutorial(alpha)

* Mat Wilson <mat jnm com au> [2006-05-18 03:10]:
        # We do not have a Glib::CLAMP function, so we provide it here.
        sub clamp ($val, $low, $high)

That is a syntax error in Perl.

              return (($val > $high) ? $high : (($val < $low) ? $low : $val));

    use List::Util qw( min max );
    # ...
    return min $low, max $high, $val;

I think the error is the lines

              # This sets the adjustment and make it emit the "changed" signal to
              # reconfigure all the widgets that are attached to this signal.
              $set->set_value(clamp ($set->value,
                                     $set->upper - $set->page_size,
to do with the commas

I donât see any error in there.

*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]