Delphi: 2 things to check when FMX/VCL units are inserted when you use VCL/FMX components


On G+, Tom Field bumped in the [WayBack] issue that the IDE would add VCL units to the uses list when putting FMX controls on a form.
I’ve observed it the other way around as well, and there are two things you need to check:

the FrameworkType element in your .dproj file

Nowadays either VCL or FMX values are allowed, but in the past more values were used, see Delphi .dproj files: FrameworkType and FormType.

the types of form files your unit embeds as resources which is either {$R *.dfm} for VCL or {$R *.fmx} for FMX.


David Nottage:
It has to do with whether there’s {$R *.fmx} or {$R *.dfm} in the unit. You may be able to get away with renaming the .dfm file to .fmx, and changing the directive in the unit.

Jeroen Wiert Pluimers:
 Your .dproj file tells you what kind of application it is (FMX or VCL) in the FrameworkType element and the IDE should respond to that correctly.

Source: In the Berlin Update 2 IDE. I’m working on a multi-device app I’m creating. …

Comments are closed.