Page 1 of 1
When should I use @loadprgini
Posted: Mon Mar 14, 2016 11:42 pm
by johansamuelsson
Hi
In 9.5 theres are the new options "@loadprgini" and "@saveprgini"
I'm a little unsure of the difference between using INI files and PRG files. For example you can extract the information "3" from the
ini-file
or the prg-file
What's the main advantage of reading information from ini-files, in which circumstances are ini-files preferable?
Moreover, there seems to be some other exciting things in 9.5, fun!
Regards Johan
Re: When should I use @loadprgini
Posted: Tue Mar 15, 2016 5:54 am
by EViews Gareth
Loadprgini let's you create a program that can permanently change its own settings. It is intended for situations where the writer of the program is not necessarily the same person as the user of the program, such as with Add-ins.
You may have an Add-in that shades a specific area on a graph. Previously if you wanted the user to choose the color of the shade you would have to ask them every time they ran the add-in. Now you can ask them the first time they run and ask them if they want to set the color as the default for ever more.
Re: When should I use @loadprgini
Posted: Tue Mar 15, 2016 7:05 am
by johansamuelsson
Ok, I see.
A related question, any plans to make "Graph70.ini" editable (if it's possibly)?
Regards Johan
Re: When should I use @loadprgini
Posted: Tue Mar 15, 2016 7:32 am
by EViews Gareth
Editable in what way?
Re: When should I use @loadprgini
Posted: Tue Mar 15, 2016 8:07 am
by johansamuelsson
I guess "Graph70.ini" is the output-file from the options the user could do by the meny "Options" / "Graphics Defaults".
So if "Graph70.ini" could be editable in an ordinary text editor, just like for example "EViews32.ini" or "ProgReg.ini" it would be much easer to controll this options and distribute them to all our user (like we do with "ProgReg.ini" and some rows in "EViews32.ini").
The alternative way is using "optsave", but we think that coding is more efficient and reliable.
When opening "Graph70.ini" in a ordinary texteditor its not readable.
Regards Johan
Re: When should I use @loadprgini
Posted: Tue Mar 15, 2016 8:15 am
by EViews Gareth
Ah, right. That's tricky/impossible.
Re: When should I use @loadprgini
Posted: Tue Mar 15, 2016 8:38 am
by johansamuelsson
By curiosity, how come?
Regards Johan
Re: When should I use @loadprgini
Posted: Tue Mar 15, 2016 8:55 am
by EViews Gareth
Graph settings aren't stored as a set of text options. They're stored as graphs objects. EViews loads up that graph object and applies its settings as the defaults.
Since graph objects (and all other EViews objects) are stored in a proprietary binary format, it isn't simple to convert it to a simple text specification.
Re: When should I use @loadprgini
Posted: Tue Mar 15, 2016 9:25 am
by johansamuelsson
Ok, I see. An alternative would be if all global options settings under the meny "Graphics Defaults..." also could be mananged by ordinary Eviews code.
Regards Johan