User forums > General (but related to Code::Blocks)
Which widget library do you mostly use?
thomas:
--- Quote ---I agree that using macros in a C++ code is a bit awkward but wxWidgets was desigend far before the advanced C++ language features.
--- End quote ---
Yes, they are using this well-known excuse for many years now. I think it is quite a lame excuse, if you will padon my saying so.
It's like saying "Yeah I know asbestos causes lung cancer, but I don't care because I built my house before that was discovered".
I mean, seriously, what kind of an exuse is that... :)
It is true that macros have a good use. Sometimes, rarely, but yes they do.
However, there is simply no excuse, except being plain ignorant or lazy (or both), why someone would insist on writing DEFINE_BLAH(SomeClass) instead of deriving from a base template.
I would not mind if the answer was "yeah sorry, we know about it, but we did not have the time to fix it". But the (transliterated) answer "hey, we were here first, screw those art nouveau C++ features" is not satisfying.
The same is true for macros like XRCID and XRCCTRL, and many others.
They are not only unnecessary and unsafe, some of them are strictly speaking illegal, as they call a macro from inside a macro. As it happens, it (accidentially) still works, but only if the order of inclusion is done correctly (...and is that a good thing?).
Another example:
How many programmers have fallen for wxMessageBox and wxMessageDialog! The former returns wxOK, but the latter returns wxID_OK, which are, as it happens, different numeric values. Fair enough, they are different constants, but they look similar enough so they can be easily confused. What happens? Nothing. No error, no anything... except your program does not work as expected.
If constants like these were typed as enums, then the compiler would not allow you to make such a mistake at all. That's why compilers are so pedantic, it really helps to avoid stupid errors.
I agree that it is absolutely not trivial to implement such massive changes on a huge thing like wxWidgets. However simply saying "hey, it's been like that for 20 years" is not good.
krisz:
I can only accept what the wxWidgets guys say (:roll:) and the mean time I agree with you. :)
I think everybody would welcome removal of macro things, and using templates instead. :!:
takeshimiya:
All the arguments against wxWidgets 2.x are addressed here: http://wxforum.shadonet.com/viewtopic.php?t=5642
In short, basically something agreed by wxWidgets and OMGUI developers is that the wx2 API is really outdated and not the most clever (it was based on MFC anyways), but not much can be done in the 2.x branch about that, the reason is backward compatibility.
And another thing agreed is that wxWidgets haves currently the best real world working implementation of native widgets on each platform.
So the developers are aware of the issues of the API, and everything will change in wx3.x branch for a really up-to-date API (of course, it will not work in older compilers like VC6, GCC2, etc), and this means using templates everywhere, shared pointers, selected boost libraries, external and better APIs included (ie. like currently wx uses libpng for png's, it will use other libs for networking, sockets, etc instead of reinventing the wheel), signals and slots, no macros usage, usage of STL everywhere, etc.
So I have hopes for either wxWidgets 3.x (aka wxTNG) or OMGUI.
For anyone wanting to know more about it: http://www.wxwidgets.org/wiki/index.php/WxWidgets3 and http://www.wxwidgets.org/wiki/index.php/WxWidgets3:Goals
yop:
I 'm using Qt 'cause it's just too damn easy to use it. The meta compiler stuff is scary and certainly non standard but it saves a lot of trouble and provides the signal - slot interface that I 've yet to see something as easy to use and understand (for me that is). The widgets are not native in windows (but very well resemble the native ones and you won't notice any difference), in linux Qt widgets *are* native widgets (What is native linux widgets? There is no such thing ;)). The community is not that large but you'll resort there in rare cases, the documentation is excelent. Bottom line, Qt is easy, cross platform, with an exellent (Java-ish I might say) style, great naming of classes methods etc. and the best available documentation. I have also used wxWidgets and FLTK, for me no comparison...
yop:
--- Quote from: mispunt on June 24, 2006, 01:37:20 pm ---I tarted with wxWidgets, but I had some problems with it, so I switched to FLTK, but I didn't like the non native gui. Now I am using VCF.
That is all because I have to program cossplatform. 8)
--- End quote ---
I 've just seen in their website that there are instructions for using the toolkit with codeblocks (installation and usage). I 'm going to give it a try for some side projects in work that I need an open source toolkit (and IDE and compiler).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version