Open EndilWayfare opened 3 years ago
This is just a matter of breaking changes in the API since the tutorial was created. If you'd like to update it, you may.
Yeah, I figured something like that. I may draft a PR when I get a chance.
Thanks for the tutorial, by the way! In addition to the GTK event-driven design patterns, you introduced me to slotmap
, which should be a very useful general dependency going forward.
The last code listing in Chapter 1.4 panics for me.
gtk-3.0.lib
: 3.24.28glib-2.0.lib
: 2.68.1rustc
: 0.53.0gtk
: 0.14.0glib
: 0.14.2Downgrading to
gtk = 0.9
, the version used in Chapter 2 example source, resolves the panic.On current
gtk
, changingto something like
also solves the panic.
Just switching to
gtk::Application
paradigm doesn't work unless you callapp.run()
instead ofgtk::main()
. My best guess, without further digging, is thatgtk::main
used to acquire the defaultMainContext
and somewhere between 0.9 and 0.14 it stopped doing that (presumably for SRP/flexibility purposes?).