Dear Brian,
On Fri, 13 Aug 2010, Brian Smith wrote:
> On Fri, 13 Aug 2010, Wayne Boucher wrote:
>
>> On (1) how do you think we should handle it? We could not allow someone to
>> create a new project where one already exists. We could remove what is
>> there but I don't think that option would get too many votes. The problem
>> is that we can't really just ignore what is there (say, with a warning)
>> because of the way the loading mechanism works (you cannot have two
>> projects inside one project directory).
>
> So, as I understand it, no part of the project is written to disk until one
> explicitly saves, so the software should not care (or even notice) that
> there's a project with the same name in the current working directory. This
> changes when the user decides to save the project (which they might do in a
> different directory from the current working directory) or they switch on the
> backup (which is off by default) - then the program should ask whether the
> user wants to overwrite the existing project/backup.
[snip]
Regrettably it does not work like that. If you have a project supposed to
live in directory xyz, the code assumes that anything in the xyz directory
belongs to that project. It may be true that no part of a project is
written to disk until you do an explicit save - but parts of the project
are *loaded from* disk. The first time the code does, say,
myProject.findFirstNmrProject(), all NmrProjects in directory xyz are
loaded. This is the price you pay for not loading all the data at once,
but keeping them on disk till needed.
So, if you create a project with the same name and storage directory as
one on disk, you must either throw an error, open the existing project,
move the existing project, or rename the new project (or its storage
directory). I think you could in theory have directories xyz, xyz_1, xyz_2
etc., each containing a project named xyz. Would we want it though?
Yours,
Rasmus
|