Page 1 of 1
List of workfiles?
Posted: Tue Nov 27, 2012 4:59 am
by paues
To retrieve pages in a workfile there is the @pagelist function. Is there something similar for retrieving open workfiles? Open databases?
Re: List of workfiles?
Posted: Tue Nov 27, 2012 7:19 am
by EViews Gareth
No.
Re: List of workfiles?
Posted: Tue Nov 27, 2012 7:56 am
by paues
In that case, would you consider adding it? Especially a @wflist function would be very handy when writing e.g. addins.
Re: List of workfiles?
Posted: Tue Nov 27, 2012 8:57 am
by EViews Gareth
We'll contemplate it, although it is somewhat tricky since EViews allows untitled workfiles, multiple workfiles with the same name, and multiple instances of the same workfile.
Re: List of workfiles?
Posted: Tue Nov 27, 2012 11:38 am
by paues
That does indeed make things trickier. But in that case, how can my program know which of two identically named work files is active? Can I be sure what workfile will be selected by wfselect?
Re: List of workfiles?
Posted: Tue Nov 27, 2012 12:08 pm
by EViews Gareth
No. The answer, as a user, is to ensure you don't give your workfiles identical names :)
Re: List of workfiles?
Posted: Tue Nov 27, 2012 12:21 pm
by paues
I see. Usually, I am all for giving the users free reins (making the application crash through infinite loop etc.).

Here, however, I would prefer if either you gave the users some way to programmatically discern between identically named workfiles or, perhaps a lot easier, just put up a one workfile per name restriction. Allowing workfiles to be opened under an alias would also be a welcome, related feature.
(It is not that I myself would do such a perverse a thing as to name two workfiles identically, but I write e.g. addins for my users and there are no ends to what they might dream of doing.

)