Join GitHub today
[Gtk] Spinner is not working because of TargetInvocationException #283
On Linux (Mono 18.104.22.168), when I create a new Spinner widget in default manner, the XWT throws an TargetInvocationException:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: libgtk-win32-2.0-0.dll
However, the same code works on Windows+GTK or Windows+WPF perfectly. As i think, the reason is at Xwt.Gtk/Xwt.GtkBackend/SpinnerBackend.cs. It uses a huge amount of win32 P/Invokes of the "libgtk-win32-2.0-0.dll". There is no any "libgtk-win32" dlls on Linux systems, and the hack doesn't work. However the Gtk# does not contain the Spinner widget (however, it presents in the GTK+, and why it wasn't added to gtk-sharp stays a question...), as i guess, it is the reason of these P/Invokes. They doesn't solve the problem fully, and on non-win32 systems should be another workaround.
Sorry me for my bad english.
Thank you for detection of my mistake. I think that this should be added to README.md. In that file is written simply "Linux+Gtk: Xwt.dll + Xwt.Gtk.dll (requires Gtk#) [*] Mac+Gtk: Xwt.dll + Xwt.Gtk.dll (requires Gtk#)" and it's does not mean that the .config file should be also added (at least for beginners).