lists & widgets
- Posted by jiri babor <jbabor at PARADISE.NET.NZ> Mar 06, 2000
- 540 views
My dear fellow incorruptible dos dinosaurs, I have whipped up a treat for you: widgets, basic dos GUI elements. They are not designed to compete with Bill's Great $cheme, or David's interpretation of that monstrosity, but if you need a button or two, a simple menu, or even a file selector, you are welcome to them. Why? And why about three years too late? Well, why not? - Initially I was provoked by the recent outbreak of OO accidents. To the simple, uninitiated mind, like mine, they all looked like either a conglomeration of spelling mistakes or a ghastly result of some terrible java(nese) affliction. I thought there had to be a simpler, better way. So I revamped my old associative lists code, and when I was quite happy with it, I was searching for an nice example, a worthwhile demo. Then I spotted my old widgets, with a three year dust layer on them. Soon enough they just took over my life, for the following couple of weeks anyway... - And after going so far, I decided I might just as well share it! Btw, associative lists, sometimes also called dictionaries, or keyed lists, are quite powerful, and at the same time very intuitive devices. And as long as the current namespace nightmare continues, they are probably the best antidote. They can, for example, easily simulate flexible structures. Sensibly combined with ordinary sequences, (see the widgets , or with hashed or sorted lists, they can also be used in creating very interesting database schemes. They are, of course, somewhat slower than ordinary sequences, but even in comparison with say btrees, they looked quite respectable. They do not suffer, not to the same degree anyway, from indexing overheads of deep nested trees. I have just sent a couple of bundles to Rob. In case he decides not to have such retrograde material on his site, you can also fetch it off my own page. Enjoy. jiri http: homepages.paradise.net.nz/~jbabor/euphoria.html