Hi all,

I'm new to Vala/Genie having come from using Python with GObject introspected bindings etc. I'm having a bit of a hard time getting to grips with the differences. One of the things that just came up is with regards to connecting callbacks to signals/events. In this case, I'm trying to connect to a Clutter.ButtonEvent on a Clutter.Stage:

stage.button_press_event.connect(self.on_clicked)
..
def on_clicked(ev:Clutter.ButtonEvent)
    ...

This gives me the following error:
error: Argument 1: Cannot convert from `MyClass.on_click' to `Clutter.Actor.button_press_event'

Some searching netted some mention of passing delegates using lambda (or something like that) on the Vala side, but I've no idea how to do that in Genie (if that's even what I need). Thanks in advance.
_______________________________________________
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to