Open graynk opened 4 years ago
Right now only possible by using closures
application.Connect("activate", func() { onActivate(application) })
You can try extending builder.ConnectSignals()
yourself, take a look in gotk3 at code where sync.RWMutex
is used in maps.
make it a TODO to the next release so...
Hi!
So I know how to pass data if I connect the handler manually. Suppose I have a .glade file with a layout that has a button, a handler and a filechooser that I want to pass to the handler. Then I'd do it like this:
However, I would really like to use "User data" column in Glade to show which objects I want to pass to the handler. I know how to connect handlers that are described in .glade file:
But that way it does not pass the object specified in .glade file, all I get is an error that says
too many closure args: have 2, max allowed 1
. Is there a way to pass data when connecting signals like that? I know in C there's a function calledg_object_set_qdata
that sets userdata on an object using key, is there something like that in gotk?