[Lazarus] Opening non existing files and (not) adding them to the project
Juha Manninen
juha.manninen62 at gmail.com
Sun Jan 17 22:34:58 CET 2016
On Sun, Jan 17, 2016 at 4:30 PM, Sven Barth <pascaldragon at googlemail.com> wrote:
> Back in 1.4.x when I opened a non-existing file and I confirmed that I want
> to have it created the file was not added to project or the project's mainfile.
> [...]
> Now with 1.6RC2 I noticed that such files are added to the uses clause of
> the main program file and the project inspector.
You cannot open a non-existing file, meaning that you cannot use the
File -> Open dialog for it. There is now a "FileMustExist" or similar
flag. I remember it fixed some bug but don't remember which one.
IMO it is logical because you can by definition only open existing
files. If a file does not exist, you must create it instead.
The right fix could be to ask if a newly created file should be added
to project which means useless questions for most people.
Or, maybe the best way is to create a file somewhere else (editor,
file manager, cmd line etc), then open it. Even an empty file can be
opened.
Juha
More information about the Lazarus
mailing list