C/GTK/Glade: gtk_grid_attach: assertion '_gtk_widget_get_parent (child) == NULL' failed

Viewed 20

Hi I am trying to move an image that is already on the XML file that I generated with Glade, I am using C and need to move the image when pressing a button, you can see on line 52 the void function and the call on gtk_grid_attach, but I keep having the same error that **assertion '_gtk_widget_get_parent (child) == NULL' failed ** but I do not know what that means, and there are not a lot of good examples or docs.

I need the widget to be a grid, because I need to use it as a matrix to move the main player across the indexes.

I don't know if maybe using an unparent function? or maybe another funtion I can use?

Here is the GTK doc I am using: https://docs.gtk.org/gtk4/index.html

Sorry I wasn't able to uploade the code, but here are the screen captures!

Code C errors

0 Answers
Related