[Lazarus] LCL=Package changes issue

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] LCL=Package changes issue

Joost van der Sluis
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?)

Joost.




--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LCL=Package changes issue

michael.vancanneyt


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.

Michael.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LCL=Package changes issue

Joost van der Sluis
On Thu, 2011-02-10 at 11:55 +0100, [hidden email] 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.

But now the project depends on the design-time package, so it will try
to compile it with the new settings, so this particular problem is still
not solved.

Joost


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LCL=Package changes issue

michael.vancanneyt


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

> On Thu, 2011-02-10 at 11:55 +0100, [hidden email] 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.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LCL=Package changes issue

Joost van der Sluis
On Thu, 2011-02-10 at 12:14 +0100, [hidden email] wrote:

>
> On Thu, 10 Feb 2011, Joost van der Sluis wrote:
>
> > On Thu, 2011-02-10 at 11:55 +0100, [hidden email] wrote:
> >> 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.

Well, I think that's not user-friendly. If I open a project I would like
to see that the IDE tells me: install this package and it will work.

> 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.

Now you are confusing Lazarus with Delphi. In Lazarus it is impossible
to install a design-time package which depends on a run-time package
without installing the run-time package. So also all run-time packages
have to be installed.

(Note however, that if you use fpmake, you can put the runtime-part in
the fpmake-package, and separately install a designtime-package into
Lazarus. Now in this case I use fpmake, so I can circumvent this
problem. But I'm the only one who uses fpmake this way...
But then remains the problem: how do I tell Lazarus/the user that he
need to install a package when he opens the project?)

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

Well, the user will need to know this rule. So when he opens the
project, and the IDE complains that he needs the 'WebDesign' package, he
has to know that he has to install the 'WebDesign-designtime' package,
and not the 'webdesign' package as the IDE tells him to do...

Joost.


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LCL=Package changes issue

Mattias Gaertner
On Thu, 10 Feb 2011 12:53:25 +0100
Joost van der Sluis <[hidden email]> wrote:

> On Thu, 2011-02-10 at 12:14 +0100, [hidden email] wrote:
> >
> > On Thu, 10 Feb 2011, Joost van der Sluis wrote:
> >
> > > On Thu, 2011-02-10 at 11:55 +0100, [hidden email] wrote:
> > >> 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.
>
> Well, I think that's not user-friendly. If I open a project I would like
> to see that the IDE tells me: install this package and it will work.
>
> > 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.
>
> Now you are confusing Lazarus with Delphi. In Lazarus it is impossible
> to install a design-time package which depends on a run-time package
> without installing the run-time package. So also all run-time packages
> have to be installed.

The IDE warns when installing a runtime package directly.

 
> (Note however, that if you use fpmake, you can put the runtime-part in
> the fpmake-package, and separately install a designtime-package into
> Lazarus. Now in this case I use fpmake, so I can circumvent this
> problem. But I'm the only one who uses fpmake this way...
> But then remains the problem: how do I tell Lazarus/the user that he
> need to install a package when he opens the project?)

Just opening a project does not require to install a package.
Opening a form does.
At the moment the IDE warns for all needed designtime packages, which
can be annoying if the form does not use any component of the package.

 
> > If you stick to this rule, then your "problem situation" will not
> > appear at all.
>
> Well, the user will need to know this rule. So when he opens the
> project, and the IDE complains that he needs the 'WebDesign' package, he
> has to know that he has to install the 'WebDesign-designtime' package,
> and not the 'webdesign' package as the IDE tells him to do...

Yes, that is an open issue.
If a project requires a design-time-only package, it should not be
compiled to the project.

Mattias

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LCL=Package changes issue

Joost van der Sluis
On Thu, 2011-02-10 at 13:12 +0100, Mattias Gaertner wrote:

> On Thu, 10 Feb 2011 12:53:25 +0100
> Joost van der Sluis <[hidden email]> wrote:
> >
> > Well, the user will need to know this rule. So when he opens the
> > project, and the IDE complains that he needs the 'WebDesign' package, he
> > has to know that he has to install the 'WebDesign-designtime' package,
> > and not the 'webdesign' package as the IDE tells him to do...
>
> Yes, that is an open issue.
> If a project requires a design-time-only package, it should not be
> compiled to the project.

Ah, shall I submit a feature-request, or do you have this already on
your todo-list? This will solve my problem, well, if I split into a
runtime and designtime package.

Joost.


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LCL=Package changes issue

Mattias Gaertner
On Thu, 10 Feb 2011 13:48:09 +0100
Joost van der Sluis <[hidden email]> wrote:

> On Thu, 2011-02-10 at 13:12 +0100, Mattias Gaertner wrote:
> > On Thu, 10 Feb 2011 12:53:25 +0100
> > Joost van der Sluis <[hidden email]> wrote:
> > >
> > > Well, the user will need to know this rule. So when he opens the
> > > project, and the IDE complains that he needs the 'WebDesign' package, he
> > > has to know that he has to install the 'WebDesign-designtime' package,
> > > and not the 'webdesign' package as the IDE tells him to do...
> >
> > Yes, that is an open issue.
> > If a project requires a design-time-only package, it should not be
> > compiled to the project.
>
> Ah, shall I submit a feature-request, or do you have this already on
> your todo-list? This will solve my problem, well, if I split into a
> runtime and designtime package.

Feel free to create such a feature request.

Mattias

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LCL=Package changes issue

Mattias Gaertner
On Thu, 10 Feb 2011 15:08:58 +0100
Mattias Gaertner <[hidden email]> wrote:

> On Thu, 10 Feb 2011 13:48:09 +0100
> Joost van der Sluis <[hidden email]> wrote:
>
> > On Thu, 2011-02-10 at 13:12 +0100, Mattias Gaertner wrote:
> > > On Thu, 10 Feb 2011 12:53:25 +0100
> > > Joost van der Sluis <[hidden email]> wrote:
> > > >
> > > > Well, the user will need to know this rule. So when he opens the
> > > > project, and the IDE complains that he needs the 'WebDesign' package, he
> > > > has to know that he has to install the 'WebDesign-designtime' package,
> > > > and not the 'webdesign' package as the IDE tells him to do...
> > >
> > > Yes, that is an open issue.
> > > If a project requires a design-time-only package, it should not be
> > > compiled to the project.
> >
> > Ah, shall I submit a feature-request, or do you have this already on
> > your todo-list? This will solve my problem, well, if I split into a
> > runtime and designtime package.

I implemented it.


Mattias

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LCL=Package changes issue

Joost van der Sluis
On Thu, 2011-02-10 at 20:02 +0100, Mattias Gaertner wrote:

> On Thu, 10 Feb 2011 15:08:58 +0100
> Mattias Gaertner <[hidden email]> wrote:
>
> > On Thu, 10 Feb 2011 13:48:09 +0100
> > Joost van der Sluis <[hidden email]> wrote:
> >
> > > On Thu, 2011-02-10 at 13:12 +0100, Mattias Gaertner wrote:
> > > > On Thu, 10 Feb 2011 12:53:25 +0100
> > > > Joost van der Sluis <[hidden email]> wrote:
> > > > >
> > > > > Well, the user will need to know this rule. So when he opens the
> > > > > project, and the IDE complains that he needs the 'WebDesign' package, he
> > > > > has to know that he has to install the 'WebDesign-designtime' package,
> > > > > and not the 'webdesign' package as the IDE tells him to do...
> > > >
> > > > Yes, that is an open issue.
> > > > If a project requires a design-time-only package, it should not be
> > > > compiled to the project.
> > >
> > > Ah, shall I submit a feature-request, or do you have this already on
> > > your todo-list? This will solve my problem, well, if I split into a
> > > runtime and designtime package.
>
> I implemented it.

Do i need to set some setting, or should this be the case by default
(for runtime-only packages)

Joost.


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LCL=Package changes issue

Mattias Gaertner
On Wed, 16 Feb 2011 14:13:38 +0100
Joost van der Sluis <[hidden email]> wrote:

>[...]
> > > > > If a project requires a design-time-only package, it should not be
> > > > > compiled to the project.
>[...]
> Do i need to set some setting, or should this be the case by default
> (for runtime-only packages)

Just set your package to runtime only.

Mattias

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus