[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 15:29:32 CET 2011
michael.vancanneyt at wisa.be hat am 2. Februar 2011 um 11:49 geschrieben:
>
>
> 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.
This would break existing projects without need.
> That would also be Delphi compatible.
That's why it is enabled for new projects. Don't forget this is just a warning
that something might be missing. It is not a necessary bug fix.
> There is one caveat: The TForm class itself should not search for a resource,
> only TForm Descendants should do this.
Huh?
That was always so.
Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110202/b7cd2bbb/attachment-0003.html>
More information about the Lazarus
mailing list