Re: [Vala] signal cascade blocking in Gtk+
- From: Andrea Del Signore <sejerpz tin it>
- To: Alessandro Pellizzari <alex amiran it>
- Cc: Vala ML <vala-list gnome org>
- Subject: Re: [Vala] signal cascade blocking in Gtk+
- Date: Sat, 05 Jan 2008 10:53:55 +0100
On Sat, 2008-01-05 at 07:01 +0100, Alessandro Pellizzari wrote:
On ven, 2008-01-04 at 23:31 +0100, Mikael Hermansson wrote:
Replace this.destroy += this.nascondi;
with:
this.delete_event += nascondi;
[snip]
Any hint?
Thanks.
Hi Alessandro,
you have to use the delete_event like this:
public class TwoWin : Gtk.Window
{
construct
{
this.title = "Second window title";
this.prepare();
}
private bool nascondi(Gtk.Widget w, Gdk.Event event)
{
this.hide();
return false;
}
public void prepare()
{
this.delete_event += this.nascondi;
var button = new Button.with_label("Ciao mondo");
button.show();
button.clicked += btn => {
this.title = btn.label;
};
this.add(button);
}
}
I think that when you tried to use it, you forgot to change the
"nascondi" function signature according to the docs ;)
Bye,
Andrea
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]