CmonLib: DataSense

This somehow is a follow-up of a CodeRage DE session of mine from 2019 (in German) showing an alternative approach to connect controls to databases. Meanwhile the technology described in that session has become a part of CmonLib.

There is a whole range of DB controls in Delphi, such as TDBEdit, TDBListBoxTDBCheckBox and a few others, which usually come as special versions of the standard controls of the same name and are characterized by the additional properties DataSource and DataField, which are used to establish the connection to the field of a data source. This connection is then usually bi-directional – the data source represents the field content in the control, but edits within the control are also passed on to the data source. This feature alone has made Delphi one of the most efficient development environments for database applications from the very beginning. Even today, a simple application for editing a database table can be realized in Delphi within a few minutes.

Unfortunately there is a growing number of controls that don’t have a DB counterpart. Even more: DB controls are a VCL-only thing. FMX lacks them completely. (Yeah, I know – Live Bindings, but…)

To the rescue CmonLib recently got a new feature: DataSense Continue reading “CmonLib: DataSense”

CmonLib: A Facelift for DataSetHelper

Some of you might already be aware of my CmonLib,  which, according to the GitHub ReadMe, is a collection of several units with different purpose.

My intention for this library was to group all those single-file-helper-units into one repository which can be added as a single submodule to any project in one go. In addition, a couple of these helpers share some common functionality which could better be mapped in one repository, while the alternative would be multiple pretty small repositories forming a hierarchy.

This means that there are very few dependencies between all units of CmonLib. For details, please refer to the ReadMe.

One of those helper units is Cmon.DataSetHelper.pas, which is the new name and place of the former DataSetEnumerator. There is another article in this blog describing that helper: Dataset Enumerator Reloaded

During the last weeks there have been some improvements and extensions to this unit which I am going to explain in this article. Continue reading “CmonLib: A Facelift for DataSetHelper”

More on Designing in High DPI

In my recent article Designing in High DPI you may have read about the problems that come with High DPI design and some more or less acceptable workarounds for those.

While the latest release of Delphi 12 Athens still does not provide a built-in solution to that problem I decided to develop a plugin handling the necessary scaling directly inside the IDE on saving the DFM files.

The project can be found on GitHub: https://github.com/UweRaabe/DFMScaling

Mind that it is still work in progress and most likely contains errors or does not cover all scenarios. If you like and find the time to try it out, please notify me of anything not working as you expect.

Also remember to vote for RSP-35301 in case you did not already. We can never have enough votes to show the priority this feature request has for a significant number of developers and teams.

Designing in High DPI

High DPI support in the Delphi IDE was introduced in Delphi 11 Alexandria. Besides the unavoidable bugs and glitches, which most of have meanwhile been resolved with updates, there has evolved a conceptual discussion about how the VCL Form Designer  should work in an High DPI context. This article explains the requirements arising in different development environments and some guides and workarounds to actually make use of this new feature. Continue reading “Designing in High DPI”