[Lazarus] LCL=Package changes issue

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Thu Feb 10 12:14:29 CET 2011



On Thu, 10 Feb 2011, Joost van der Sluis wrote:

> On Thu, 2011-02-10 at 11:55 +0100, michael.vancanneyt at wisa.be wrote:
>>
>> On Thu, 10 Feb 2011, Joost van der Sluis wrote:
>>
>>> Hi all,
>>>
>>> Although the new LCL=package approach is a big step forward, I have the
>>> idea that all complaints about the old system, which you can find
>>> everywhere, are all addressed. But those parts that were useful for the
>>> power-users, who didn't complain, have become a little bit trickier.
>>>
>>> One thing, for example. I have a package installed which only compiles
>>> for gtk2. I use it to design forms (webpages, actually). Now I have an
>>> application that depends on this package because of other dependencies,
>>> but doesn't really use it. But I compile this application for the
>>> 'nogui' widgetset.
>>>
>>> Now the IDE detects a change in settings (as I understood it right), so
>>> recompiles all packages with the settings for the application. Which
>>> fails, because my package doesn't compile for 'nogui'.
>>>
>>> Is there some 'trick' possible to avoid this? Or do I have to split up
>>> some packages so it has a design-time and a run-time part? (Making
>>> maintenance and installation more difficult for new users?)
>>
>> You should always do so ? This is also true in Delphi as of version 6.
>> I think it is good to force users to separate design and run-time code.
>>
>> I would even go so far as to forbid the dependency of a run-time package on
>> a design-time package if the latter depends on the IDE interface package.
>
> I thought you would say so. I hoped Mattias would respond earlier then
> you. ;)
>
> But even in that case: to properly design my project you need this
> design-time package. So I want my project to depend on this design-time
> package, or else users who open it will not be prompted to install this
> design-time package. All they will see are some error messages that the
> IDE can not handle the forms.

This is also the case in Delphi.

I don't see a problem with that, because you should always install the 
design-time package, never a run-time package. The run-time package will 
automatically be compiled when you install the design-time package.

If you stick to this rule, then your "problem situation" will not appear at all.

Michael.




More information about the Lazarus mailing list