Am 14.05.2020 um 11:09 schrieb Sven Schreiber:
Am 14.05.20 um 02:47 schrieb Allin Cottrell:
> On Sun, 10 May 2020, Sven Schreiber wrote:
>>
>> 1 - This first problem I cannot reproduce with a minimal function
>> example; I'm suspecting it might depend on being wrapped inside a
>> package. The problem is that the descriptive label of a series is _not_
>> overwritten with a new content when the series itself is replaced by the
>> return value of the package.
Some new evidence here: When going to "edit attributes" of that modified
series (via right-click) the new assigned descriptive label is shown
alright in the attribute window. So it seems it's just the main window
where the variable's description isn't updated.
If you want to try for yourself you can use the version of the
series_calculator package I just uploaded to the staging area: (1) Run
the sample script, then (2) execute the package in the GUI and specify
"output" as the return series while leaving the other arguments at
defaults. Expected: the descriptive label gets overwritten with
something not containing sin or cos, but in reality nothing visible happens.
>> 1b - Another thing that somehow seems to depend on doing it
inside a
>> package: Doing 'setinfo myseries --description="@mylabel"' for
an
>> existing string variable 'mylabel' just yields the literal
"mylabel" as
>> description.
Hm, this is working now, perhaps the restart of gretl in the meantime
helped.
> However, there is a "hidden" mechanism available which
should probably
> be tested more, perhaps modified, and documented: you use eval() in
> this content. So for example this should work:
>
> string s = "whatever"
> setinfo some_series --description=eval(s)
Good to know, I can try that.
Haven't tried this since the straightforward way now works (see above).
thanks
sven