[fpc-devel] System.UITypes and Lazarus

Michael Van Canneyt michael at freepascal.org
Sun Feb 9 21:22:31 CET 2025



On Sun, 9 Feb 2025, Bart via fpc-devel wrote:

> Hi,
>
> The Delphi compatible unit System.UITypes is getting out of sync with Lazarus.
> The reason for this is twofold:
> 1. the faster release cycle of Lazarus
> 2. the fact that Lazarus supports more widgetsets, for which we also
> need enumerations, and Delphi does not have these.
>
> This can lead to errors as described in
> https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41300
>
> While this can be worked around, my question (no offense intended) it
> raises some questions in my head.
>
> First:
> Why the need for such a unit?
> IOW: what is the use-case for needing the enumerations out to the unit
> where they ar actually used (and were defined to begin with)?
>
> Second:
> Given the fact that enumerations like TOpenOption etc. are related to
> GUI applications, why does this unit "reside" in fpc and not in
> Lazarus?

Because it transcends the LCL or any widgetset out there:

Delphi has this unit to offer a common set of types for the VCL and FMX GUI frameworks.

The primary purpose to have it in FPC is Delphi compatibility, 
and in particular to be able to compile FMX applications (which is now possible).

We can try to enhance it with things needed by Lazarus, but it should never 
move to Lazarus, that would go against its purpose.

Michael.


More information about the fpc-devel mailing list