List of workfiles?

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

paues
Posts: 218
Joined: Fri Apr 15, 2011 7:16 am
Location: Stockholm, Sweden

List of workfiles?

Postby paues » Tue Nov 27, 2012 4:59 am

To retrieve pages in a workfile there is the @pagelist function. Is there something similar for retrieving open workfiles? Open databases?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: List of workfiles?

Postby EViews Gareth » Tue Nov 27, 2012 7:19 am

No.

paues
Posts: 218
Joined: Fri Apr 15, 2011 7:16 am
Location: Stockholm, Sweden

Re: List of workfiles?

Postby paues » Tue Nov 27, 2012 7:56 am

In that case, would you consider adding it? Especially a @wflist function would be very handy when writing e.g. addins.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: List of workfiles?

Postby EViews Gareth » Tue Nov 27, 2012 8:57 am

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.

paues
Posts: 218
Joined: Fri Apr 15, 2011 7:16 am
Location: Stockholm, Sweden

Re: List of workfiles?

Postby paues » Tue Nov 27, 2012 11:38 am

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?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: List of workfiles?

Postby EViews Gareth » Tue Nov 27, 2012 12:08 pm

No. The answer, as a user, is to ensure you don't give your workfiles identical names :)

paues
Posts: 218
Joined: Fri Apr 15, 2011 7:16 am
Location: Stockholm, Sweden

Re: List of workfiles?

Postby paues » Tue Nov 27, 2012 12:21 pm

I see. Usually, I am all for giving the users free reins (making the application crash through infinite loop etc.). :twisted: 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. :roll: )


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest