<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<title></title>
</head>
<body>
<p style="margin: 0px;"><span> </span></p>
<p style="margin: 0px;"> </p>
<div style="margin: 5px 0px 5px 0px;">
michael.vancanneyt@wisa.be hat am 2. Februar 2011 um 15:48 geschrieben:<br/>
<br/>
>[...]<br/>
> >> I think you should do the opposite: The default should be 'True', and users<br/>
> >> should disable this explicitly. <br/>
> > This would break existing projects without need.<br/>
><br/>
> I did some tests. For a TDatamodule descendant, TMyDataModule.Create(Nil)<br/>
> gives an error if there is no resource. For a form, the form remains empty.
</div>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">A TDataModule without resource makes no sense. At runtime instead of a TDataModule you can use any TComponent.</p>
Same for TFrame. At runtime you can use a TPanel instead.<br/>
That's why it makes sense to raise an exception if a TFrame/TDataModule is created without a resource.<br/>
OTOH a form without resource makes sense and is often done.<br/>
<br/>
<p style="margin: 0px;"> </p>
<div style="margin: 5px 0px 5px 0px;">
<br/>
> I knew about the former, and had assumed the form would react the same as TDataModule.
</div>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">There are more differences than similarities between TForm and TDataModule. And TForm is older than TDataModule.</p>
<p style="margin: 0px;"> </p>
<br/>
Mattias<br/>
<br/>
</body>
</html>