Re: signal functions in a package module file



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]