[Lazarus] A change in LCL require your TCustomForm descendants to have a resource or to use a CreateNew constructor
Mattias Gaertner
nc-gaertnma at netcologne.de
Wed Feb 2 16:12:33 CET 2011
michael.vancanneyt at wisa.be hat am 2. Februar 2011 um 15:48 geschrieben:
>[...]
> >> I think you should do the opposite: The default should be 'True', and users
> >> should disable this explicitly.
> > This would break existing projects without need.
>
> I did some tests. For a TDatamodule descendant, TMyDataModule.Create(Nil)
> gives an error if there is no resource. For a form, the form remains empty.
A TDataModule without resource makes no sense. At runtime instead of a
TDataModule you can use any TComponent.
Same for TFrame. At runtime you can use a TPanel instead.
That's why it makes sense to raise an exception if a TFrame/TDataModule is
created without a resource.
OTOH a form without resource makes sense and is often done.
> I knew about the former, and had assumed the form would react the same as
> TDataModule.
There are more differences than similarities between TForm and TDataModule. And
TForm is older than TDataModule.
Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110202/4ba0d015/attachment-0003.html>
More information about the Lazarus
mailing list