This is becoming less of a mud development blog than a 'bitch about wxWidgets sucking' blog. I've run into yet another piece of wxWidgets wierdness: wxBitmapButtons don't work. The documentation claims bitmaps can be used instead of the default graphics; trying this results in a very small bitmap wedged inside a ten pixel thick border of default graphics. There appears to be no way to turn this behaviour off.
I'm sure that there's a perfectly good reason why it behaves this way. It might be intentional; it might be that my development platform (GNU/Linux) is more buggy than other platforms; it might be that I'm simply terrible at operating this toolkit. Regardless, its unacceptable, and it is only with great reluctance weighing my application requirements that I did not switch to something else this very night.
Screw this toolkit. I wrote a text window class for exactly this reason, and quite frankly if I'd have done it to start with I'd have saved myself a lot of time. I will not make that mistake again, and as of right now I'm creating an image button class. I might not know what I'm doing, but at least I'll know it works properly, on all the platforms I need it to.
I get the feeling that by the time I'm done with this, I'll have using only the event handling loop and the font selection dialog. It seems like those are the only widgets that actually function as documented.
Wednesday, August 12, 2009
Subscribe to:
Post Comments (Atom)
2 comments:
[disclaimer: I'm a wx developer without any real knowledge about your project brought to your blog by a random Google alert]
wxBitmapButtons certainly do work under Linux as can be seen in any of the wx samples using them (e.g. controls or widgets). And if you really think that you found a bug in wx, why not try reporting it (although you would probably discover a problem in your code when trying to do it) instead of bitching about it on your blog? wxWidgets does have its share of problems (I am well placed to know about them...) but not every bug in your application is due to its shortcoming.
Also, without ever asking about your problems on wx-users nor reporting bugs you're unlikely to ever get any help...
Vadim,
As I said in my posting, I'm almost certain that wxBitmapButtons work properly. We're talking about a class with probably a dozen functions and a couple bitmaps in it; really, how hard could it be? I wrote a reasonable replacement in about an hour, so it can't be that complicated.
Nevertheless, the wx library doesn't fucking work for me, in my environment, while my drop-in replacement, written to a subset of the same published interface, does.
Why don't I 'just' debug the libraries? Let me count the reasons:
1) I often have no idea what is broken. If I actually knew what was wrong, you better believe I'd fix it.
2) My goal is to write my application, not to become an expert debugging wx libraries.
3) I don't want to post on boards and wait for a week in the hope that some wx guru will take pity on me. (What I really want is for the documentation to work as advertised.)
4) It's not time effective for me to debug the libraries. It costs me at least a double schedule slip to work around wx weirdness, as opposed to simply writing my own replacements.
I'm not joking about writing drop-in replacements. It takes me less time to implement from scratch than to figure out how to use the existing stuff. My reimplemented functions always work, and they work the same on all platforms, every time. Why the default wx classes cannot do this as well is quite frankly beyond me.
Post a Comment