Open asarch opened 4 years ago
Well, the problem is that the handler receives the msg
, no? I suppose that's also why there's no library function for it yet, no clear idea of how this should look like.
Something like (g-signal-connect-instance (boton instance) #'cheers)
?
Though of course now you'd likely have to have a way of specifying where event arguments go in the call. Or they're always discarded? I don't see how that's a good case to make for a dedicated function. But maybe I'm wrong. Could you write up how you'd deal with those cases, or why it's not a problem?
There are also some libraries to generate anonymous functions more succinctly, maybe that's another way of approaching it.
If you would have:
dialog.glade
and this piece of code:
How would you connect the "clicked" signal to the cheers function of the class' protocol without actually using anonymous functions (just like the gtk-builder-connect-signals function to the package does)?