Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question

closed as too localized by bodhi.zazen, jrg Feb 27 '12 at 20:29

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Could you post more of your code? I don't understand why you would need to use the CCode modifier, you should be able to connect a handler to the signal directly and let Vala sort out the parameters. –  Jim Nelson Dec 7 '11 at 22:29
    
This question appears to be abandoned, if you are experiencing a similar issue please ask a new question with details pertaining to your problem. If you feel this question is not abandoned, please flag the question explaining that. :) –  bodhi.zazen Feb 27 '12 at 18:08
add comment