On Thu, 10 Sep 2009, Summers, Peter wrote:
I don't know if this is a bug or a reflection of my relative
inexperience with session files. I opened a previous session &
did some further work, then when I tried to save the data set
(ctrl-s), I got an error message saying "couldn't open [my data
set] for writing." I've since figured out that I need to save
the session itself, rather than the data set, but I'm wondering
if this is gretl's intended behavior in this case.
Hmm, I think this may need some work, but I'll try to explain the
basic idea.
The intent is that a "session" file is a self-contained snapshot.
It should be possible to open it again later and, even if the data
file that you originally opened when you first constructed the
session is long gone, you still have your session intact.
To achieve that, we save a copy of the working dataset inside the
session file itself (it's a pkzip archive).
Now, suppose that in the course of the intial session you make
some changes to the dataset you opened (e.g. add some newly
defined variables). In that case, when you close that session you
are prompted for two things: (a) Do you want to save your session?
And (b) do you want to save the changes you made to the dataset?
(I.e., do you want to sync the external disk file with the
modified dataset that will be stored in the session file -- though
that's too much of a mouthful to put in the dialog!)
However, I see what you mean. If you do Ctrl-S in a reopened
session you get a message about being unable to write the data.
That's bad.
Perhaps, with a session open, Ctrl-S should be reinterpreted as
"save the session"? Either that, or you should get a "Save as"
dialog for the data. (Or does anyone have a better suggestion?)
The basic point is that when the session file is re-opened, the
data file that "belongs to the session" is no longer associated
with an external datafile that could be saved independently of the
session (as it was when the session was new).
Allin Cottrell