Maybe worth to try TApplication.scaled?
Without meaning to criticise either project, I don't know which is worse: that Lazarus has added something without conditionalising it or that FPC complains about an undefined field without supporting the obvious way of excluding it.
Without meaning to criticise either project, I don't know which is worse: that Lazarus has added something without conditionalising it or that FPC complains about an undefined field without supporting the obvious way of excluding it.
Declared() simply does not allow dots. It only allows identifiers (including generics) currently. I have it somewhere on my ToDo list to add support for dots as well, but we all know the problems with ToDo lists... %)
Indeed. As I said, I wasn't trying to criticise but I don't really know whose responsibility fixing that one is. It would have been easier if additions to automatically-inserted Lazarus code had been marked by a conditional.
Lazarus assumes that you're using a project generated with version X with version X or newer (here the version that generates a project with Application.Scaled does provide Application.Scaled as well). In my opinion that is a valid assumption.
There are some setting to treat a project with as much backwards compatibility as possible.
Maybe you can file a feature request to have it write that info in ifdef's based on that setting?
Purely out of curiosity, can anybody say what version of FPC was first able to evaluate the
{$IF LCL_FullVersion >= ...
directive?
Please note that I'm not asking anybody to go looking for an answer, I can trawl through compiler release notes as easily as anybody.
In mode Delphi since some time in the 2.0.x series, in mode ObjFPC since 2.2.0 and for all modes since 3.0.
...
It can very well be that this isn't mentioned in the release notes. Not everything is mentioned there...
Yes, it is not mentioned at https://wiki.freepascal.org/FPC_New_Features_3.0.0 as I see. I don't know how to 'formulate it' in the wiki.
Declared() simply does not allow dots. It only allows identifiers (including generics) currently. I have it somewhere on my ToDo list to add support for dots as well, but we all know the problems with ToDo lists... %)