January 30, 2003

I did get back to Blog coding yesterday finally (and before DeViLbOi starts his cry of “PostMan, PostMan” again, I will get to PostMan too but I feel that I should work on the apps that have users since they do want bug fixes :p) and set out to find out what the problem was with adding custom snippet buttons to the edit toolbar. Incidentally, I probably should have started work on BlogMan since that still needs to be finished up for final release but since Blog and BlogMan share the UI, BlogMan has the same problem with adding snippet buttons to the toolbar and so it is all good 🙂

Anyway, since I couldn’t remember what the exact problem had been, I decided to go another route and check up on the ActionBand component in Delphi since that’s what I used to provide the customizable edit toolbar in Blog and that was where adding the snippet buttons was causing problems. I discovered that a new patch had been released which solved some problems with the ActionBand component and though none of the listed fixes seemed relevant to me, I applied the patch anyway since that might fix something obscure which was affecting what I was trying to do. While downloading the patch, I saw a demo which showed you how to save toolbar customizations for ActionBands if you create toolbar items dynamically. Since the snippets are user defined, they have to be created dynamically and so I took a look at the demo and that gave me some ideas as well.

Even after applying the patch and integrating the ideas from the demo, it still didn’t work the way I wanted and so I ended up splitting up the custom snippet menu/toolbar creation code into three separate procedures from the original one. This allowed me to have better control under different circumstances and this helped a bit but I got stuck again at that point. By this time however, I had remembered the actual problems that I was trying to fix :p One was that all edit toolbar customizations disappear when you invoke the custom snippet definition dialog and click OK. I had fixed that by this time. The other was an internal problem that I had discovered earlier while trying to fix the former – internally, the edit toolbar gets multiple copies of the same button and while only one displays, each time you do a customization, the number of invisible buttons on the toolbar goes up. I finally discovered the reason for this too (and that was just by accident) and I managed get it all fixed and now have the custom toolbar stuff working fine 🙂

I also intend to change the UI a bit for the next release – I know it’s supposed to be a bug fix release and there shouldn’t be any functional changes (at least, that’s my internal rule :p) but I think this is necessary. The current UI is a bit too cluttered and confusing since I’ve had many people ask me what the area next to the category selection box is since it’s never used – it’s for built-in Blog comments incidentally – and that’s bad utilization of screen space. So I’ve decided to borrow something from BlogMan and go with a tabbed interface. The main entry area will have a single tab for the title, entry and the category selection box, there will be a separate tab for previewing and another tab for the comments. That should make things a bit more neater and organized – I hope …

Be Sociable, Share!
Tags: General
Posted by Fahim at 6:36 am   Comments (0)