Menu

Bits and Bobs - Generating Menus from XML

It's been too long, SourceForge! Too long since I've posted or updated everything. I've been busy. Busy doing what exactly? Well, I was in the British Informatics Olympiad final for one. The proof of this is here: http://olympiad.org.uk/2010/index.html (because apparently some people on the Internet lie, and that list offers pretty firm proof that I'm not one of them). That kept me busy for a while.

The other thing that's been keeping my busy is that I've been slowly gaining a social life, which, sadly, means less late nights of programming fervour - this one I'm having right now is the first in at least a month, a previously unheard of period of absence.

Things are still going on, in a sluggish sort of way. For example, my love of ridiculous, perhaps over-the-top customisation has led me to format my menus in XML, in order that users can re-arrange menu items and sort them into different menus and change shortcuts at their convenience, which I thought was a pretty good aim, so I've been developing a few routines that will take the XML and create menus from it. So far it works, I'm just sorting out the conversion of shortcut strings into actual shortcuts - shouldn't be too bad.

Obviously, there are a limited number of menu items that will actually do anything, and maintaining the id's of the menu items is important so that they'll actually do something. I'm labouring under the impression that linking the menu items to procedures has to be done on a per-program basis in Pascal. (Of course, in Python, it'd probably be possible to automagically link the menu item names with the method names, but I don't work in Python. I'm starting to forget why I don't.)

But if you can put up with that, it gives users a lot of freedom to define how they want their application to function. I know a lot of people probably won't like Ctrl+T to open a new tab, so the ability to change it to something more familiar is always a good thing.

I don't think it's stepping into the dangerous territory of "too much configuration" quite. Designing menus in Lazarus is a pain anyway, the inbuilt menu editor's a bit clumsy, I think I actually prefer defining them in XML as a personal preference.

Hopefully this rant made some sense, I'm writing it at one in the morning listening to "Mark of the Beast", so a little insanity might be forgiveable.

In short, ShmenonPie is still developing software, don't despair. It's just slow. It always was, so nothing's really changed.

Thanks for reading this.

Posted by ShmenonPie 2010-05-24

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.