Open DBLouis opened 4 years ago
Can you provide a complete code example that reproduces the problem? The connect object feature is not currently supported, but that also shouldn't usually be needed.
If you use the example repo, take the builder_signal program and add an object attribute to the button. It will panic with the same error.
I new to GTK, basically I wanted to have one function that called show() on any widget and pass the name of the widget via the userdata. But maybe that is not possible.
You will have to pass any context into the signal handler when creating the closures in there. I can't remember the details about the connect object feature, but if I remember correctly it was difficult/impossible to implement that safely.
Is passing user data to a signal handler supported? I load and XML generated by Glade and it panics here: https://github.com/gtk-rs/gtk/blob/master/src/builder.rs#L81. I am not sure if this failed assert means that I messed up somehow or if this is not supported.