Vala: How to use Glades ActionGroup correctly
- by Tom
Could someone give me an example how to use Glade's ActionGroup with a Gtk.Builder in a Vala-Application?
If I have an ActionGroup with an Action save, and on this action I've set the activate Signal to "on_save_clicked", should it be fine to write:
[CCode (instance_pos = -1)]
public void on_save_clicked(){
print("I would like to save, please\n");
}
in global scope and then use builder.connect_signals(null)?
When i do this, i just get "Could not find signal handler 'on_save_clicked'" when executing the program. No compile errors.
I'm using
valac --pkg gtk+-3.0 test.vala
for compiling and glade-3.10.0