I'm both a D noob and a GTK noob so I might be doing something trivially wrong here.

In glade I set up a button that has a click signal callback called onbuttonclicked. I use builder to read in that file.

If I define the function in D like:

extern(C) void onbuttonclicked() {

writeln("you pushed the button!!!");

}

All works great. But if I try to use the Button as a param in that D method (which I assume is supported as the gtk verison of this takes a pointer - https://developer.gnome.org/gtk3/stable/GtkButton.html#gtk-button-clicked)

extern(C) void onbuttonclicked(Button b) {

writeln("you pushed the button!!!");

b.getLabel();

}

I get a :

Program exited with code -11 on the b.getLabel() line.

Any idea what I am doing wrong?

Thanks in advance!

  • Damian