Fox Toolkit Sucks ASS!

פורסם תחת הנושאים: כללי מאת: esatire ביום שלישי 11 באוגוסט, 2009

My second warning to the world after ‘Travian‘ - the horrible online game where you get to be bullied up your back hole by groups of strangers, is about the GUI (Graphical User Interface, in case someone doesn’t know) library by Jeroen van der Zijp - Fox Toolkit.

You can feel free to look for info about it on the net if you’re interested, because I’m not going to advertise it anymore than I already do. Let me just say that never in my life have I ever had to deal with such an undocumented, cryptic, oddly behaving library.
I chose it as a test several years ago for a pet project, which grew up to be quite a nice audio player that I use on a daily basis. Unfortunately, it has come to the point where rewriting it from scratch is just too much work, so I’m stuck with Fox toolkit.

Jeroen doesn’t just like to do things his way - he also makes it sure only he knows what the hell they are doing.

Example: The documentation for an FXOptionMenu… “Option Menu”.
Great! When you click on ‘more’, you get this additional informative text:
Detailed Description: Option Menu.”
Thanks buddy! If you never wanted anyone to use your graphical library, then you shouldn’t have put it on the net, or at least gave a fair warning in advance.

I know it’s being given for free, but for god’s sake - no examples to be found, a message board that contains very few actual answers to bugs I encountered (WHY THE HELL DOES A POPUP CORRUPT MY ENTIRE SCREEN VIEW?!?!?!?! Ah, right, because there’s a target for notifications, but the selector is 0. MAKES SENSE?! I KNOW IT DOESN’T!!!!!).

Moreso than that, since the project is maintained, as far as I could tell, only by this one courageous soul, he doesn’t have the time, nor the patience, to deal with all the requests, complaints, and oddball queries.
That is understandable, but be warned all of you - your question may not be answered, or you’ll get a friendly “that’s the way it is, stupid”, like many others before you.

Forget 3rd. party documentation. In fact, forget documentation at all. I had to read the fucking source code so many times just to know what some function does, and then try to rewrite them because the base class couldn’t be modified easily.
Speaking of base classes - trying to extend FXTable was virtually impossible - because there was no way to find which of the many virtual functions needed to be reimplemented, and which didn’t.

I’ll have to commend no other than Microsoft now. Yes yes - the big devil from Redmond was smart enough to realize that some people want a table in which you can select whole rows, not just cells! But forget about it in fox-toolkit. ‘Not a popular way of using the widget’ says the author.
Sigh.
With tables in .NET this is but a simple change of a variable. Roughly 3 seconds of work.
Took me a day to figure out how to do this thing in fox. When I was finally done, it felt cathartic - like breaking out of a North Korean prisoner camp!!!

I might be a bad programmer, but I worked with many libraries in my life, and I know one basic fact:
When it’s time to choose a new library to work with - make sure it is well documented, has a responsive developer base / community, and has premade examples you can work with.
In case of a graphical library, make sure the widgets have working demos/examples/programs with source codes that show the functionality of every single class!
This way, you won’t have to waste too much time of your life trying to implement missing functionality that other people get for free because they picket the right tools from the start. In normal circumstances, you should not have to look inside the source code of the library.

And by the way - it just gets worse with the more recent versions. Why were the functions in FXFile split to four different classes? How about keeping some kind of reference to them? Why do we need to play Indiana Jones trying to find where the missing magical functions went?
And really thanks for the unicode support - now all the Hebrew that I used to see automatically turned to question marks, and unicode Hebrew became Chinese. It might be a simple thing to fix that - if you’re Mr. van der Zijp. Otherwise - good luck with figuring out the unicode library! It makes the ancient winapi functions look like pure fun!
You know what was easier than figuring out why the unicode doesn’t work anywhere? That’s right - going back to an earlier version of the library, that doesn’t use it. Big thumbs up.

One last note - why ignore the STL? Why advise your users not to use the STL?! This isn’t 1998 anymore - using the STL in C++ is a good thing! Why yet another string class? Another vector, another linked list… No no no!
Speaking of FXString - What is ’section’? Where is ’substring’? Oh right, it’s ‘mid’. Makes perfect sense. I guess it’s very hard to type ‘middle’, but then what is ‘find_first_not_of’ doing there?

I know I’ll never pick Fox Toolkit ever again, and if you guys know what’s good for you, you wouldn’t either. I can recommend two others right off the bat - FLTK (Which is more innovative, compact, and easier to understand), and WxWidgets (Which is massive, but at least well documented!)

I will finish with an eloquent GRRRRAAAAAAARRRGGGGHHHHHHHHHHHHHHH!!!!!!!!!!




התבנית שייכת למערכת בלוגלי
עוצבה על ידי evil.bert
תורגמה על ידי מרג’