Gtk.CClosureExpression in Vala

Really that’s just a problem with the binding, ideally valac would be smart enough to generate the closure expression automatically for a given function

Not really, that’s what user_data is for

1 Like

No, it shouldn’t have an “instance” argument; and no, it doesn’t make things difficult for any binding.

Not every function passed to a callback has to be a method of a class. In general, a lot of callbacks aren’t methods at all. You have to deal with that when writing GLib-based code.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.