Tao of the MachineProgramming, Python, my projects, card games, books, music, Zoids, bettas, manga, cool stuff, and whatever comes to mind. |
Front page Last 10 archives 2003-03-15 2003-03-22 2003-03-29 2003-04-05 2003-04-12 2003-04-19 2003-04-26 2003-05-03 2003-05-10 2003-05-17 Category archives bettas books CCGs Charm esoterica Firedrop games general ideas internet Kaa linkstuffs Lisp manga music Mygale Nederland nostalgia programming Python SGI switch Wax Zoids :: Search All posts ...by category ...by date ![]() :: About me :: Oasis Digital :: Resume :: GeoURL :: RSS :: Atom ![]() ![]() |
More wxPython woes: wxImage, wxBitmapSo I thought the wxListCtrl class was hairy. Enter wxImage. What a pain. Judging from the demo, you’d think it’s relatively easy to load and display an image. Wrong; all my attempts failed. Even copying the exact demo code to my file would not work. Eventually it comes down to two problems:
Not very friendly, so there is another task for Wax. Here’s the code that displays an image in a frame: class MainFrame(Frame): The line It can be done even shorter, by the way, using the Do you hate the wxListCtrl class too? ;-)No? Well, bully for you. I happen to dislike the class greatly, because I never seem to be able to figure out how to get it to work. The example in the demo uses an image; what if I don’t want an image? And what’s up with having to call That can, no, must be done better. So I added a class named ListView to Wax, which is going to take care of this. This is how you create it: And this is how you populate it: You can now use [row,column] syntax to get or set the value of a “cell”: More Leckerbissen will be added later. But, damn, I cannot release the code yet. The main reason is that it’s too unstable. Everything so far works fine, but I have only covered 20-odd wxPython controls, and some are vastly incomplete (lacking common events for example). On top of that, everything is still subject to change. Maybe tomorrow I’ll decide that the layout stuff needs rewritten, or something like that… major code breakage could be the result. To put it another way: I don’t want to get angry mails when I release a version that’s not backwards compatible, and I don’t want to get mails pointing out that it’s not complete. I know that. If you really, really want the development code, you can drop me a mail and I’ll send it to you, but I strongly discourage using it for anything else but testing. At this point I also cannot accept other people’s classes, because I’m still trying to figure out “the Wax philosophy”. In the meantime, let’s ponder the idea of adding data-aware controls to Wax… LinksAfter some more tinkering with the Firedrop2 code, it is now ready for some more web publishing. I am putting (parts of) my link collection online, mostly so I can reach important URLs from anywhere, rather than having to search through bookmarks scattered over 5 browsers. But others might find some of the links interesting as well. This is very much a work in progress. The collection will grow over time. Update. My resume is online as well. Charging for softwareSome people are having a discussion about whether software should be charged for.I happen to know a bit about economics (hey, we all make mistakes when we’re young… :-) Therefore, two remarks. 1. Economy is not just about money. It’s also about, say, labor, products, and services, to name a few things. Something can have economic value other than a monetary one. If I write software, and don’t plan to sell it, then it’s pointless to make a calculation like, I worked 100 hours on it, I’m worth $50/hour, so my costs are $5000. The cost for writing it was my time, which I voluntarily offered, because I like to hack. It’s something I do for fun. There’s no monetary cost, any more than there would be when I had spent my time watching tv, or playing cards, or sleeping. There’s also no hidden cost for anyone who downloads and uses my program. 2. Economy as we know it is in the process of changing, because of software. For the first time in history, there’s something that you can produce (write) and distribute at no cost at all. This is what many programmers regularly do; they write a program, slap it on a website, and everybody can download it for free. This wasn’t possible in the old situation. If I produce, say, chairs, and 1000 people want one, then I have to make 1000 chairs. Same for services. But with software, I can have the costs of writing it once, then distribute it as many times as I want, without any additional cost. Software is different, and old notions (and laws) about ownership, theft, copyright and such, are not so clear anymore. If someone steals my chair, I lose the chair itself (property), and the opportunity to sell the chair. If I’m a taxi driver and my customer doesn’t pay for his ride, my costs were not compensated by payment. That’s quite clear. But… if Johnny makes a copy of company X’s program, then there is no cost that wasn’t offset by payment. In fact, in most cases company X won’t even know about it; what’s more, they need to resort to dubious methods to find out if people use their products without a license. That’s why you cannot call this “theft” in the original sense of the word. Nothing was stolen. The company still has all their money, still has their program. One could argue that the company lost the opportunity to sell it to Johnny, but he wasn’t going to buy it anyway, so no loss there either. Of course, whether copying commercial closed-source software is legally and morally acceptable, is a very controversial issue, and won’t go into it further at this time. I’m sure there are other websites where you can discuss this in detail. :) Speaking of having too much time...Rude softwareProblems with software are quite common, to say the least. It can be buggy, lacking quality, in beta, unstable, clumsy, unfriendly, incomplete, unfinished, not backwards compatible, out of date, etc. There are often reasons and excuses for all of these. But IMHO there’s no excuse for software that’s rude. My definition of rude software is, that it does things behind your back, does things without asking, or generally interferes with your work… and it’s deliberately designed to do so. Let’s look at some examples.
You may not (always) be able to avoid writing software that’s buggy, incomplete, etc… but you can make sure it isn’t rude. The vim mugBram Moolenaar (in newsgroup post): “Besides the Vim logo there are a dozens of Vim commands explained. We tried adding all the commands, but realized it’s difficult to drink coffee from a bath tub…” In other merchandise news, SoBe has a new beverage, Grape Grog, and you can win a t-shirt. I want it… ˆ_ˆ -- Generated by Firedrop2. |