Posted on 2006-06-08 15:59:33-07 by ygr
Glib and Gtk communication.
I am writing a program in perl which invokes a small window. This window should time out after some time. For the window I use Gtk2. For the timeout I use Glib::Timeout

The code looks something like this:

my $dialog = new Gtk2::Dialog( );

(creating some buttons and all)

my $timer = Glib::Timeout->add( $interval, \&some_func));

Gtk2->main;

This returns Not a CODE reference at /program_path line line_number

Should I use Glib (and how?) or is there any other function I should use.
Direct Responses: 8764 | Write a response
Posted on 2008-09-07 17:45:43-07 by kaffee in response to 2437
Re: Glib and Gtk communication.
After correcting the syntax errors, and adding "use Gtk2 -init;", your example works for me. What does your complete program look like?
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.