I guess this is a newbie type question.

I have a button like so.

$button = new Gtk::Button("Test");
$button->signal_connect("clicked", \&print_test($begin_pay_period, $YEAR, $days_in_year));

I can't figure out what is wrong with this? But basically as soon as the program is started the &print_test sub-routine runs (but not correctly). When the button is clicked then I get this.

Not a CODE reference at ./timesheet.pl line 107.

Line 107 looks like this.
main Gtk;

So what am I doing wrong here? Can't you pass in values to a sub-routine like that? If not then how do you 
pass them in?

Brian Avis
SEARHC Medical Clinic
Juneau, AK 99801
(907) 463-4049
cd /pub
more beer

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