[Lazarus] A change in LCL require your TCustomForm descendants to have a resource or to use a CreateNew constructor
Bart
bartjunk64 at gmail.com
Wed Feb 2 12:24:45 CET 2011
What is the meaning of the second parameter in CreateNew()?
I cannot see it being used in TCustomForm.CreateNew().
Bart
On 2/2/11, michael.vancanneyt at wisa.be <michael.vancanneyt at wisa.be> wrote:
>
>
> 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.
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
More information about the Lazarus
mailing list