Re: [Vala] Builer connect signals
- From: Frederik <scumm_fredo gmx net>
- To: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Builer connect signals
- Date: Tue, 22 Sep 2009 20:19:10 +0200
John - wrote:
I have this code :
public class TestWindow : GLib.Object
{
public TestWindow ()
{
Builder builder = new Builder();
try
{
builder.add_from_file ("test.ui");
}
catch (Error exc)
{
}
builder.connect_signals (this);
}
[CCode (instance_pos = -1)]
public void on_testButton_activate(Button sender)
{
//some code
}
}
I create a GtkBuilder project file for gtk 2.16 with glade2.
The signal code doesn't work, it loads test window with button but code for signal activate doesn't run.
Did you specify the right callback name in Glade? It must be
'test_window_on_testButton_activate', or if it's inside a namespace
'namespace_name_test_window_on_testButton_activate'. Or are you on
Windows? In this case you would have to add G_MODULE_EXPORT.
Best regards,
Frederik
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]