[Lazarus] Close all menu item ?

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Mar 23 17:41:05 CET 2020


On Mon, 23 Mar 2020 14:34:02 +0100
Martin Frb via lazarus <lazarus at lists.lazarus-ide.org> 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


More information about the lazarus mailing list