I wrote this code:
using Gtk;
public void on_bcliccami_activate(Button source)
{
source.label="clicked!";
source.show_all();
}
int main (string[] args) {
Gtk.init (ref args);
try {
var builder = new Builder ();
builder.add_from_file ("gui.glade");
builder.connect_signals (null);
var window = builder.get_object ("window") as Window;
window.destroy.connect(Gtk.main_quit);
window.show_all ();
Gtk.main ();
} catch (Error e) {
stderr.printf ("Could not load UI: %s\n", e.message);
return 1;
}
return 0;
}
I compiled it with "valac --pkg gtk+-2.0 --pkg gmodule-2.0 main.vala -o
GladeExample".
But when i click on button of my application callback method is not called!
Why?
I use Vala 0.10.0.
I attached my glade file.
Attachment:
gui.glade
Description: application/glade