I recently went on and removed wxWidgets from the current DSharingu code. I previously looked at that library and decided to avoid it. Recently, I figured that I could give it a second (third) look, since I’ve become more tolerant of C++.
Using those libraries is like believing in UFOs and ghosts. There are so many people that will swear they once saw a flying saucer or a ghost… but when it’s time to prove things real, somehow it just never works.
wxWidgets surely has a lot of work behind, it seems like there is so much support, but somehow it never took off. Basically, it requires quite a bit of learning to do, and it’s not too pleasant as it forces to use inheritance and macros to define event tables.
There is an HTML manual and all, but if one already knows how to do Windows programming, it’s just much easier to continue on that path. It’s so easy to find help on the net for plain Win32 programming, while with wxWidgets one is stuck with limited resources.
Of course, wxWidgets is free, so one shouldn’t complain. However, it’s a bit misleading to read people saying “It was a breeze to switch to wxWidgets, I’ll never go back !” and other bullshit like that.
I think that I can fairly say that wxWidgets is not the way to go. It may be the best existing multi-platform solution which attempts to maintain the host’s OS look and feel… but at what price ? How many people do really need that ?
What finally made me decide to go back was the Settings dialog. With Visual Studio, I’d build one with the resource editor. Very old thing, but does its job.
With wxWidgets, there is more than one attempt at making tools for building dialogs. However, the official and reliable resource editor costs $69 !
I tried to re-build the dialog using the sizers. A sizer is basically an object that helps creating an automatic layout.
It’s a bit like using tables in HTML, but a lot more difficult !
Being sizers objects, new really start coming. Also there is so much function overloading that it’s pretty difficult to get the right parameters hinted by IntelliSense. It can quickly turn into a nightmare, as the number of nested sizers grows.. and then, the layout is still messed up !
Too much effort, too many compromises. It comes to think that all I really wanted to do for the GUI in DSharingu was to put a standard toolbar and modify the settings dialog. But.. I had to go and try commit myself to such a big change.
bha
I now modified the settings dialog. I will add a few more things, test, optimize transmission, and I think that will be it. It can be improved forever, but it’s not something I’m trying to sell, no need for special effects.. just something that works, and then I can start spending time onto something new !
Posted by Davide Pasca in Programming
