I need some help on GTK (C): https://stackoverflow.com/questions/56092425/gtk-tree-model-foreach-assertion-gtk-is-tree-model-model-failed
@angristan why are you using GTK on macOS in the first place? 🙂
@bugaevc school project
No idea why you're getting the error, your example works for me. You could try debugging gtk_tree_model_foreach() to see what it really gets and why GTK_IS_TREE_MODEL() check fails.
@bugaevc why does this print 1
@angristan well here you're clearly not initializing it, and of course NULL isn't a GtkTreeModel
@bugaevc looking at the debugger, my GtkListStore is also NULL...
@angristan that explains it, but in the piece of code that you've posted on Stack Overflow you are initializing it properly and not resetting it afterwards
@bugaevc that's so weird
@angristan you can debug that with a watchpoint to see when your variable gets set to NULL
@angristan actually it might be that send_card() is missing a first argument of type GtkWidget or something, and the pointer you're getting as global_struct is actually a pointer to the widget
@bugaevc I can't thank you enough!
But I g_signal_connect it the same way:
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!