[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: signal functions in a package module file
- From: Emmanuele Bassi <ebassi gmail com>
- To: gtk-perl-list gnome org
- Subject: Re: signal functions in a package module file
- Date: Wed, 23 Jul 2008 08:20:33 +0100
On Wed, 2008-07-23 at 10:31 +1000, Kevin Ryde wrote:
> muppet <scott asofyet org> writes:
> >
> > hide the dialog window in response to the delete-event,
>
> Could gtk_widget_hide_on_delete() be wrapped to help that? I guess
> you'd have to say \&Gtk2::Widget::hide_on_delete, which is a bit of a
> mouthful.
$dialog->signal_connect(delete_event => sub { $dialog->hide(); TRUE; });
is less of a mouthful. :-)
hide_on_delete() is mostly a C convenience function because C does not
have closures: I wouldn't bind that inside an high-level language that
does have them.
ciao,
Emmanuele.
--
Emmanuele Bassi,
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]