Saturday, April 12, 2008

Alternative to TToolbar

Download sample code


If you are a DevExpress user, like me, you will use TdxBarManager instead of any of the standard Delphi controls that are available. I can imagine that CodeGear doesn't invest anything in (any of) the user interface controls with such many excellent alternatives around.

I am a VCL component developer too (for internal use that is). Most of those controls go with an ActionList for it's functions. The end user can access the functions using (amongst other things) a TToolbar. And one thing that I had not done (until today) is to replace the TToolbar component that I was using for toolbars that are part of the controls.

Now, I might be alone on this, but I think that TToolbar is one of the worst components that is in the standard package. It behaves irratically and configuring at runtime (as I do in my controls) is really a pain. Some years ago I created a subclass that kind of worked ok. But I never was happy with it.

This weekend I took it upon me to integrate the TdxBarManager into the current set of UI controls. The solution took me a bit of work, but I think that how I did might benefit others. So, I've created a demo project that demonstrates how you can use the TdxBarManager as a toolbar as part of your own UI VCL controls.

Unzip, compile the package, install it and run the demo program. That should do it.

If you have any questions, just mail me.

These examples are just a proof of concept and you will need to do some work on it to get it going. My actual code is a bit more complex than this. I might have forgotten something or made some typos.

Friday, April 11, 2008

Writing for PDALive.com

As from this week I will be writing for PDALive.com on a regular basis about things that concern Windows mobile phones. I own a HTC TYTN II myself. Apart from personal experiences I will write about projects and programs that we do that involve (windows) mobile phones.

First project will be an application that will be created to offer the user support information. One of out partners (LearningGuide Solutions) sells training material which is published as an end user support system in HTML and as trainingsbooks in PDF.

The next few weeks and months (probably) we will create a new application/publication that targets Windows Mobile phones. I am still looking for some ways to use Delphi for that, but I don't think that will be wise or possible. It will probably be C# and .Net (which of course is fine).

You might see some copies of articles I will create for PDALive on this blog. I will mark those with a special label.

Bye,
Bart

Class helpers vs Subclassing

In a Dutch Delphi forum I came across a posting that had some sample code using 'class helpers'. At first, I didn't know what it was. Later I realized I had seen that before, but somehow I forgot about those. Class helpers extend an existing class, without subclassing.

I tried to put down why I don't use class helpers, but do subclass frequently. I couldn't (and can't) remember. While writing all the pros for subclassing, I couldn't find and argument agains class helpers. Except of course, you can't override members. It took me a while to realize (again) why I don't help a class, but do subclass.

If anyone is reading this, what is your opinion about the subject? Are class helpers of *any* use?

Bye,
Bart

Monday, April 07, 2008

Rediscovering FogBugz

This weekend I had a bit of a crisis because I couldn't see the forest from the trees (is that English at all?). There is simply so much to do, that I panicked a bit and wondered how to solve that.

I thought it would be best to make a list of things to do. Sometimes that helps to realign your thoughts. First I started typing the list as tasks in Microsoft Outlook, but I realised that I tried that many times before and I simply don't like that. So, I looked further on at the tools we have. I realized that we use FogBugz for storing our bug reports and feature requests, but I could also use it to create my own lists.

I did know FogBugz has a couple of things that we don't use (wiki, discussion board) because I think that user interface is too simple. But I found that, after entering my task list and estimate the time needed for that, FogBugz has a great feature. It can calculate if a planned release date can be met or not. It will also tell you the probability that you will make that date.

Even based on this weekends work it already tells me the probability for the next release (about 20% :-(). I can imagine that, if you use it to plan bigger amounts of work of more people, it can be a really helpfull thing. So, we will be good boys and use that feature of FogBugz and see if it helps.

If you don't know: FogBugz s created by FogCreek, a company with a state of mind much like ours. Just read http://www.fogcreek.com/About.html.

Bye,

Bart