For reasons quite unfathomable by me, you would like to get your hands on a list of all forms in your project. [1]
But wait. Do you want this at design time? Or at run time?
Oh, at run time. Pfffew. Ok. I can do that.
…
Which scenario do you like better?
You wake up in the morning. The sun shines brightly through your window, but for all you care it might as well be pouring with rain. The bug reports are stacked high and low on your desk. The minute you walk in someone from support will be on your back about clients X,
…
You are working on your application and want to add some color to spruce it up a bit. Setting colors using Delphi’s Object Inspector is a breeze. That is, when you use the predefined colors from the color property’s drop-down list.
Or when you use the color dialog that opens when you double click the Object Inspector’s edit for the color property.
…
Enums are nice!
You have found out about enumeration types and you clearly see the advantages they hold over plain, tired, old integers. They are specific, self documenting, type safe – you can’t pass one type of enum when another is expected. Oh yes, you love enums. And enum sets.
…
You are in the Delphi IDE and need to make a new form. It looks like another form you already have, but not quite. You could copy and tweak it. That’s the quick way to get the result you need. That’s the way most of your predecessors have gone about creating new forms.
…
Well, yes. And no.
You shouldn’t be using literal values anyway. You should be using constants. And when you use constants everywhere, there is absolutely no point in testing whether a constant actually has the literal value assigned to it. No sense in testing the compiler. After all,
…
A developer by trade, an eternal student by heart, I am now turning to teaching.
Or rather: I am now turning to sharing and hoping that someone might learn something from it so I can lay claim to being a teacher in the future.
…