Re: [gtk-list] gnome-perl: signal_connect_after



On Tue, Jan 18, 2000 at 11:57:11PM -0600, Noonian wrote:
> From what I can tell signal_connect_after in gnome-perl is merely a synonym
> for signal_connect; my signals attached with signal_connect_after don't
> appear to be processed any differently than signals connected without the
> _after.  I'm not all that familiar with XS, or I'd fix it myself and submit
> a patch:

Check Gtk/xs/GtkObject.xs: with XS code it's possible to use
aliases, perl sets the ix variable according to how the function
was called.
Try for yourself this example with and without s/_after//.

#!/usr/bin/perl -w

use Gtk;

init Gtk;

$b = new Gtk::Button('quit');
$w = new Gtk::Window();

$b->signal_connect_after('clicked', sub {print "after\n"; Gtk->exit(0)});
$b->signal_connect('clicked', sub {print "first\n"});

$w->add($b);

$w->show_all;

main Gtk;

lupus



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