[email protected] 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
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to