org.sonar.l10n.delphi.rules.community-delphi.FormDfm.html Maven / Gradle / Ivy
The newest version!
Why is this an issue?
Omitting the corresponding .dfm
resource for a VCL form or frame is typically a
programming error. While there are some cases that won't cause problems at runtime, it remains
unintuitive and confusing.
Additionally, a unit that doesn't contain a .dfm
resource will lack design-time form
editing functionality.
This rule flags any TForm
or TFrame
descendant in a unit that doesn't
include a .dfm
resource.
How to fix it
Add a .dfm
resource to the unit:
unit Foo;
interface
uses
Vcl.Forms;
type
TFoo = class(TForm)
// ...
end;
implementation
end.
unit Foo;
interface
uses
Vcl.Forms;
type
TFoo = class(TForm)
// ...
end;
implementation
{$R *.dfm}
end.
© 2015 - 2024 Weber Informatics LLC | Privacy Policy