POE::Session::GladeXML2 0.3.1 review

Download
by rbytes.net on

POE::Session::GladeXML2 is a Perl module that can emit POE events for Gtk2 callbacks. SYNOPSIS package test; use POE::

License: Perl Artistic License
File size: 11K
Developer: Martijn van Beers
0 stars award from rbytes.net

POE::Session::GladeXML2 is a Perl module that can emit POE events for Gtk2 callbacks.

SYNOPSIS

package test;

use POE::Session::GladeXML2;

# the name of the sub needs to match with the name you entered in
# the glade signal handler dialog.
sub on_button1_clicked {
print STDERR "button clickedn";
}

sub new {
[... object creation ...]
my $session = POE::Session::GladeXML2->create (
glade_object => $self,
glade_file => 'test.glade',
glade_args => 'widgetname',
[... POE Session params ...]
);

return $self;
}

Gtk2::GladeXML->init;
my $foo = test->new;
$poe_kernel->run();

A simple helper module that lets you connect callback names from your .glade file with methods of an object. These methods are called as POE callback or postback methods. POE::Session::GladeXML automatically determines whether gtk expects the signal handler to return a value. If it does, a callback is used, otherwise a postback will be used.

Requirements:
Perl

POE::Session::GladeXML2 0.3.1 keywords