Closed mtilda closed 1 month ago
When I clone this repo, cd
into examples
, and run cargo run --bin custom_buildable --features="v4_10"
, there is no error or warning. Surely I have configured something differently in my repo...
You forgot to enable the required feature for that function. As you can see in your command, you are enabling v4_10
Okay, that makes sense. I am able to fix the error by modifying my Cargo.toml file like this:
[dependencies]
-gtk4 = "0.8.2"
imp = "0.1.0"
+
+[dependencies.gtk]
+package = "gtk4"
+version = "0.8.2"
+features = ["v4_10"]
I am copying the Custom Buildable example in this repo using GTK 4.10.4 on Ubuntu 23.04.
You can see what crates I'm using in my Cargo.toml and Cargo.lock files.
Problem
The program panics with the following error:
Commenting out this line in my version of the code avoids the panic, but causes the following warning when I run the application and close the Custom Buildable window:
Open questions
~Are others able to reproduce this behavior?~
~Should we change the following line or some other code in this example?~
https://github.com/gtk-rs/gtk4-rs/blob/44ec2cf599a33df0990ecb579493b5305e604885/examples/custom_buildable/custom_buildable/imp.rs#L38