[Lazarus] A change in LCL require your TCustomForm descendants to have a resource or to use a CreateNew constructor
michael.vancanneyt at wisa.be
michael.vancanneyt at wisa.be
Wed Feb 2 11:49:27 CET 2011
On Wed, 2 Feb 2011, Paul Ishenin wrote:
> Hello, Lazarus mailing list.
>
> I've changed the behavior of TCustomForm.Create constructor. Now it raises an
> exception if your TCustomForm descendant has no resource.
>
>
> The behavior is controlled by a global variable *RequireDerivedFormResource*
> which is set to True for all new applications created by the IDE and is set
> to False by default. If you for some reason want the old behavior just remove
> "RequireDerivedFormResource := True" line from .lpr file of your new
> application.
I think you should do the opposite: The default should be 'True', and users
should disable this explicitly. That would also be Delphi compatible.
There is one caveat: The TForm class itself should not search for a resource,
only TForm Descendants should do this.
Michael.
More information about the Lazarus
mailing list