[Lazarus] Close all menu item ?

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

[Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list

Hi,

"Close all" in the file menu does not close the project inspector (and, I
suppose, the project)

Is this by design ?
I'm asking because in Delphi 'Close all' really closes "all".

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list
On 23.03.2020 10:23, Michael Van Canneyt via lazarus wrote:
> "Close all" in the file menu does not close the project inspector (and, I
> suppose, the project)
>
> Is this by design ? I'm asking because in Delphi 'Close all' really
> closes "all".

Hello,

yes this difference is by design. To close the project in Lazarus IDE
you have to execute Project -> "Close Project" from the menu. File ->
"Close all" closes all open editors.

Ondrej

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

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list


On Mon, 23 Mar 2020, Ondrej Pokorny via lazarus wrote:

> On 23.03.2020 10:23, Michael Van Canneyt via lazarus wrote:
>> "Close all" in the file menu does not close the project inspector (and, I
>> suppose, the project)
>>
>> Is this by design ? I'm asking because in Delphi 'Close all' really
>> closes "all".
>
> Hello,
>
> yes this difference is by design. To close the project in Lazarus IDE
> you have to execute Project -> "Close Project" from the menu. File ->
> "Close all" closes all open editors.

OK, thank you.

Any particular reason for this behaviour ? It seems a bit strange to me to
treat the project differently.

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list
On 23.03.2020 10:59, Michael Van Canneyt via lazarus wrote:

> On Mon, 23 Mar 2020, Ondrej Pokorny via lazarus wrote:
>> On 23.03.2020 10:23, Michael Van Canneyt via lazarus wrote:
>>> "Close all" in the file menu does not close the project inspector
>>> (and, I
>>> suppose, the project)
>>>
>>> Is this by design ? I'm asking because in Delphi 'Close all' really
>>> closes "all".
>>
>> Hello,
>>
>> yes this difference is by design. To close the project in Lazarus IDE
>> you have to execute Project -> "Close Project" from the menu. File ->
>> "Close all" closes all open editors.
>
> OK, thank you.
>
> Any particular reason for this behaviour ? It seems a bit strange to
> me to treat the project differently.

This feature is not from me. I was hit by it as well when I started
using Lazarus. AFAIR it's been always so. I got used to it and I find it
logical.

I set up Lazarus to remember open editors (to reopen them when a project
is opened) and so after some time the count of open editors grows a lot.
This is a way to close all editors easily and have a clean source
editor. On the contrary, If I want to close the project and keep the
open editors remembered, I use the "Close Project" menu item.

So for me Delphi should fix their behavior to match Lazarus :)

Ondrej

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

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list

Op 2020-03-23 om 13:34 schreef Ondrej Pokorny via lazarus:

>  reason for this behaviour ? It seems a bit strange to me to treat the
> project differently.
>
> This feature is not from me. I was hit by it as well when I started
> using Lazarus. AFAIR it's been always so. I got used to it and I find
> it logical.
>
> I set up Lazarus to remember open editors (to reopen them when a
> project is opened) and so after some time the count of open editors
> grows a lot. This is a way to close all editors easily and have a
> clean source editor. On the contrary, If I want to close the project
> and keep the open editors remembered, I use the "Close Project" menu
> item.
>
> So for me Delphi should fix their behavior to match Lazarus :)
>
Personally I hate the mandatory open project (or else the modal
options). E.g. you want to open a .lpk and you have to create a project
first to open the menu item.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list
On 23/03/2020 13:35, Marco van de Voort via lazarus wrote:
> Personally I hate the mandatory open project (or else the modal
> options). E.g. you want to open a .lpk and you have to create a
> project first to open the menu item.

Well, this is not because it is desired. I doubt there would be
objection to changing it.

This is (afaik) only due to the initially (long ago) chosen design.
Today a lot of code, relies on the global "project" variable. So far I
know of no one, who wants to rewrite all of this...

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

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
El 23/03/2020 a las 10:55, Ondrej Pokorny via lazarus escribió:

> On 23.03.2020 10:23, Michael Van Canneyt via lazarus wrote:
>> "Close all" in the file menu does not close the project inspector
>> (and, I
>> suppose, the project)
>>
>> Is this by design ? I'm asking because in Delphi 'Close all' really
>> closes "all".
>
> Hello,
>
> yes this difference is by design. To close the project in Lazarus IDE
> you have to execute Project -> "Close Project" from the menu. File ->
> "Close all" closes all open editors.
Maybe the texto should be "Close all editors", then

>
> Ondrej
>


--
Saludos

Santiago A.

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

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Mon, 23 Mar 2020 14:34:02 +0100
Martin Frb via lazarus <[hidden email]> wrote:

> On 23/03/2020 13:35, Marco van de Voort via lazarus wrote:
> > Personally I hate the mandatory open project (or else the modal
> > options). E.g. you want to open a .lpk and you have to create a
> > project first to open the menu item.  
>
> Well, this is not because it is desired. I doubt there would be
> objection to changing it.
>
> This is (afaik) only due to the initially (long ago) chosen design.
> Today a lot of code, relies on the global "project" variable. So far
> I know of no one, who wants to rewrite all of this...

Yes, the design is that the session (open files, positions, jumps,
bookmarks, encoding, line ending, etc) are stored in the project.

A package needs the settings of the project, e.g. macros like
target OS/CPU.

So if you want to edit a package or files without any project, the
easiest way would be to implement a dummy/default project. Some
functions and menu items must be disabled. And some error messages must
be improved.
The big questions are:
Should the IDE restore the dummy session after a restart? If yes, then
it must store the session and reload.
And if yes, should a Close All wipe the whole session, e.g. file
properties?


Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Mon, Mar 23, 2020 at 2:35 PM Marco van de Voort via lazarus <[hidden email]> wrote:
Personally I hate the mandatory open project (or else the modal
options). E.g. you want to open a .lpk and you have to create a project
first to open the menu item.

Not really because a project is always opened automatically when you start Lazarus.
It's either the previously used project or a new empty project.
The new empty project behaves almost like "no project" because you don't have to save it.
IIRC the "Close Project" entry was added after a user request, but it is rather useless. You cannot do much anything when projects are closed. Everything is disabled then.
I also remember the initial confusion because of this feature but now it feels very functional.
A project never needs to be closed explicitly, it gets closed when another project is opened or when the whole IDE is closed.

Juha


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

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list


On Mon, 23 Mar 2020, Juha Manninen via lazarus wrote:

> On Mon, Mar 23, 2020 at 2:35 PM Marco van de Voort via lazarus <
> [hidden email]> wrote:
>
>> Personally I hate the mandatory open project (or else the modal
>> options). E.g. you want to open a .lpk and you have to create a project
>> first to open the menu item.
>>
>
> Not really because a project is always opened automatically when you start
> Lazarus.
> It's either the previously used project or a new empty project.
> The new empty project behaves almost like "no project" because you don't
> have to save it.
> IIRC the "Close Project" entry was added after a user request, but it is
> rather useless. You cannot do much anything when projects are closed.
> Everything is disabled then.
> I also remember the initial confusion because of this feature but now it
> feels very functional.
> A project never needs to be closed explicitly, it gets closed when another
> project is opened or when the whole IDE is closed.

Well, I think it does need to be closed from time to time.

Namely: I want to be sure that all is closed before doing an svn
update or git pull. Although many bugs have been fixed, still from time to
time when you do an update of files on disk, Lazarus messes up and
overwrites incoming changes.

These things are unfortunately very hard to reproduce. I have reported
several problems to Mattias, who promptly fixed them, but still it occurs
under hard-to-reproduce circumstances.

So, for safety, now I close the IDE, do the svn/git update, and then open the IDE.

In Delphi (which has the same problem with SVN/git/...),
I don't close the IDE, I just close all files.

Luckily, the startup time of Lazarus is much shorter than Delphi's
(the latter easily takes up to a minute to start).

I could also temporarily open another project, but that is just as much a
kludge as closing the IDE, worse yet, I can inadvertently change that
project - and I know this from experience :(

So, yes, I would actually prefer that 'Close all' does what it says on the
tin, and really closes *all*.

That I cannot do anything after this till I have opened the project again,
is quite OK with me. It would even be OK if it just automatically started an
empty new project after I did 'close all', as during startup. Just as long
as all previously opened files are closed.

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list
On 23.03.2020 20:26, Michael Van Canneyt via lazarus wrote:
> Well, I think it does need to be closed from time to time.
>
> Namely: I want to be sure that all is closed before doing an svn
> update or git pull. Although many bugs have been fixed, still from
> time to
> time when you do an update of files on disk, Lazarus messes up and
> overwrites incoming changes.

I fixed a bug that rewrote the incoming LPI changes recently and that
annoyed me for years: https://bugs.freepascal.org/view.php?id=36813

I am not aware of other bugs that would rewrite external changes. Please
report them.

(Well, maybe there is still one bug left in the Lazarus file cache.
Sometimes it reports wrong file datetimes. Let's see if I come across it
at some point. I don't remember the last time I was hit by it.)

Ondrej

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

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list


On Tue, 24 Mar 2020, Ondrej Pokorny via lazarus wrote:

> On 23.03.2020 20:26, Michael Van Canneyt via lazarus wrote:
>> Well, I think it does need to be closed from time to time.
>>
>> Namely: I want to be sure that all is closed before doing an svn
>> update or git pull. Although many bugs have been fixed, still from
>> time to
>> time when you do an update of files on disk, Lazarus messes up and
>> overwrites incoming changes.
>
> I fixed a bug that rewrote the incoming LPI changes recently and that
> annoyed me for years: https://bugs.freepascal.org/view.php?id=36813

Yes, I saw it, and I am glad one more case is fixed.

>
> I am not aware of other bugs that would rewrite external changes. Please
> report them.

As soon as I can reliably reproduce them. As said, they are not easy to
reproduce.

It took me several years to be able to report just one particular case to Mattias
:(

So as far as I am concerned, the case for actually closing everything still
stands.

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list
On 24.03.2020 9:08, Michael Van Canneyt wrote:
> So as far as I am concerned, the case for actually closing everything
> still stands.

I though "Close Project" does the thing, or isn't this good enough?

Ondrej

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

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list


On Tue, 24 Mar 2020, Ondrej Pokorny via lazarus wrote:

> On 24.03.2020 9:08, Michael Van Canneyt wrote:
>> So as far as I am concerned, the case for actually closing everything
>> still stands.
>
> I though "Close Project" does the thing, or isn't this good enough?

No, because it leaves open packages, and it does not actually close the project
inspector. See attached screenshot: my lazarus after I clicked 'Close project'.

Note the project inspector is still open, and the package editors as well.

So I must press 'Close all' (closes the packages) and then 'Close Project'
(closes the rest, almost) to achieve my desired result: No open editors...

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus

close.png (180K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Tue, Mar 24, 2020 at 10:56 AM Ondrej Pokorny via lazarus <[hidden email]> wrote:
I though "Close Project" does the thing, or isn't this good enough?
+1
Exactly. As a bonus the editor files session of the closed project is remembered and reopened next time.
Please remember that "Close all" is in File menu, not in Project menu.
Delphi has its project menu items in File menu which is counter-intuitive.
IMO Lazarus works logically in this regard. If you don't want to do "Close Project", you can do "New Project". You don't need to save it but all IDE features remain enabled.

Juha


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

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list


On Tue, 24 Mar 2020, Juha Manninen via lazarus wrote:

> On Tue, Mar 24, 2020 at 10:56 AM Ondrej Pokorny via lazarus <
> [hidden email]> wrote:
>
>> I though "Close Project" does the thing, or isn't this good enough?
>>
> +1
> Exactly. As a bonus the editor files session of the closed project is
> remembered and reopened next time.
> Please remember that "Close all" is in File menu, not in Project menu.
> Delphi has its project menu items in File menu which is counter-intuitive.
> IMO Lazarus works logically in this regard. If you don't want to do "Close
> Project", you can do "New Project". You don't need to save it but all IDE
> features remain enabled.

See my (held for moderation, attachment to big) answer to Ondrej
for why this reasoning is insufficient and the current Lazarus
behaviour is actually buggy.

It's in fact hilarious that I am forced to even discuss this ! :-)

I mean, how hard can it be to understand this ?

To any normal human being, *Close All* means close *ALL*.

'All' is just a 3 letter english word with a very clear meaning.
Savour the simplicity of it by pronouncing it out loud, prolongue the 'l'
sound if you need that to fully grasp the meaning and beauty of this word :)

No offense meant, but if the team need to explain this much why it is not
really doing what it says on the tin, then it's simply ill-conceived.

https://www.startupvitamins.com/products/startup-poster-a-user-interface-is-like-a-joke-if-you-have-to-explain-it-its-not-that-good

Oh well, I suppose there are worse things in the world.
(even disregarding the current health crisis ;-) )

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list
On Tue, Mar 24, 2020 at 11:39 AM Michael Van Canneyt via lazarus <[hidden email]> wrote:
To any normal human being, *Close All* means close *ALL*.

But when it is under File menu, it means "Close All Files".
:-)


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

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list

Op 2020-03-23 om 19:39 schreef Juha Manninen via lazarus:

> On Mon, Mar 23, 2020 at 2:35 PM Marco van de Voort via lazarus
> <[hidden email] <mailto:[hidden email]>>
> wrote:
>
>     Personally I hate the mandatory open project (or else the modal
>     options). E.g. you want to open a .lpk and you have to create a
>     project
>     first to open the menu item.
>
>
> Not really because a project is always opened automatically when you
> start Lazarus.
> It's either the previously used project or a new empty project.
> The new empty project behaves almost like "no project" because you
> don't have to save it.
> IIRC the "Close Project" entry was added after a user request, but it
> is rather useless. You cannot do much anything when projects are
> closed. Everything is disabled then.

I often do close project before updating svn, since that might also
update project files.


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

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 2020/03/24 11:39, Michael Van Canneyt via lazarus wrote:

>
>
> See my (held for moderation, attachment to big) answer to Ondrej for
> why this reasoning is insufficient and the current Lazarus behaviour
> is actually buggy.
>
> It's in fact hilarious that I am forced to even discuss this ! :-)
>
> I mean, how hard can it be to understand this ?
>
> To any normal human being, *Close All* means close *ALL*.
>
> 'All' is just a 3 letter english word with a very clear meaning.
> Savour the simplicity of it by pronouncing it out loud, prolongue the 'l'
> sound if you need that to fully grasp the meaning and beauty of this
> word :)


Firstly, Michael, that was quite fun to read, I enjoyed it :)

Secondly, I've been following this thread with some ambivalence, but
before it gets silly - kindly remember the small feature called "Context".

What does the word "Open" mean to "any normal human being"?  It's simply
an adjective/verb, perhaps describing a property of a thing being
unclosed, or the action of making a thing unclosed. In the File menu the
word "Open" only gets it's meaning via the sub-context of being in the
"FILE" menu. If it was in the Project menu or Package menu (oh look,
there it is...) it would bestow it's meaning on a completely different
thing.

Why are we Ok with the sub-context bestowed on "Open" and the difference
in meaning when it's in the Project menu vs. when it is in the File menu?

I can repeat the above for "New" or indeed "Close".

When a menu says "Close All" it must by definition mean "... for the
stuff that this menu is about", otherwise every menu item caption must
be altered to carry the whole menaing and a GUI will start looking like
a shakspeare novel. (To be fair, Lazarus does actually call it "Open
Project" on the Project menu - a superfluous text, but not exactly
harmful/hampering).

When you want to Close (or do anything else with) the project, do it
from the Project menu. If you want to do stuff with the files in the
project, do it from the File menu. Asking to change the behaviour of the
interface for everyone in the World cause your sense of English is
offended is, well, some would say "arrogant", but I'm not like that, I
would merely call it "highly expectant". :)


On a serious note devs, if one did click "Close All" and the project
closed too or reopened the default project (since at the end of the day,
a Project is also a file), I doubt anyone would complain or find it
weird or complainable. If I did NOT want the project to close, I
certainly wouldn't click on any menu item with the words "Close All", so
perhaps in this case, notwithstanding what I said above, and if it isn't
a lot of effort, evryone would be fine with this change and it would
indeed help sort out any SVN niggles.

Cheers,
Ryan



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

Re: [Lazarus] Close all menu item ?

Free Pascal - Lazarus mailing list


On Tue, 24 Mar 2020, R.Smith via lazarus wrote:

> On 2020/03/24 11:39, Michael Van Canneyt via lazarus wrote:
>>
>>
>> See my (held for moderation, attachment to big) answer to Ondrej for
>> why this reasoning is insufficient and the current Lazarus behaviour
>> is actually buggy.
>>
>> It's in fact hilarious that I am forced to even discuss this ! :-)
>>
>> I mean, how hard can it be to understand this ?
>>
>> To any normal human being, *Close All* means close *ALL*.
>>
>> 'All' is just a 3 letter english word with a very clear meaning.
>> Savour the simplicity of it by pronouncing it out loud, prolongue the 'l'
>> sound if you need that to fully grasp the meaning and beauty of this
>> word :)
>
>
> Firstly, Michael, that was quite fun to read, I enjoyed it :)

That was the primary intent. I'm glad you understood the intent, humour and
irony is not always clear in mails...

As I said, it's in my eyes hilarious that I "must" discuss this, no offense
to anyone is meant.

For all clarity and all involved:

Notwithstanding the bug I mentioned in my mail to Ondrej
(still waiting for the moderator to approve my mail) :

I can live with the current behaviour, but I really don't think it is logical,
(even taking into account "context" :)) and I think Delphi in this instance has it 'right'.

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
12