Thread

Posted on Thu Jun 8 18:59:33 2006 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 Sun Sep 7 20:45:43 2008 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?
Write a response