How do I connect a custom function to the clicked action of a GTK Button?
I am working my way through the Vala GTK+3 tutorial provided by Elementary OS. I understand that this code: var button_hello = new Gtk.Button.with_label ("Click me!"); button_hello.clicked.connect (() => { button_hello.label = "Hello World!"; button_hello.set_sensitive (false); }); uses a Lambda function to change the button's label when it's clicked. What I want to do is call this function instead: void clicked_button(Gtk.Button sender) { sender.label = "Clicked. Yippee!"; sender.set_sensitive(false); } I've tried this: button.clicked.connect(clicked_button(button)); But I get this error from