On Thu, 22 Oct 2009, Artur T. wrote:
I am surprised that it is not possible to save models within the
loop function. I really thought that this worked some versions
ago, but I might e wrong.
I'm not 100% certain, but pretty sure this has never worked. The
difficulty is that commands within a loop are handled "deep
inside" libgretl, as opposed to commands registered via GUI
point-and-click or the gui console. (The processing of commands
within a loop is shared between the gretl GUI program and
gretlcli, which has no concept of "named models".)
So to get this sort of thing to work we need to exploit a
"callback function" from libgretl to the GUI program, whereby
libgretl says, "Hey, the user wants to save this model under a
given name, can you handle that?".
As it happens, I'm working on that right now (I started earlier
today). What I'm aiming to implement is:
* the ability to save a named model within a loop;
* the ability to add the last model to the "model table" within a
loop; plus
* the corresponding functionality for graphs within loops (save
named graph; add graph to the GUI "graph page").
So this is something that, hopefully, should be available before
too long.
Allin