On Tue, 19 Feb 2013, Logan Kelly wrote:
Is there an easy way to integrate a package into the GUI.
I would like to develop package for my MBA stats course that
automates some of the procedures they use, e.g. calculate a
prediction interval after running OLS, etc. It would be
nice if I could give them a package to install that would
add these functions to the GUI menu, but I am not sure how
big this project would be.
There is in fact a way to integrate a function package into
the gretl GUI: you can arrange to offer an entry under the
main menu system, or if the function operates on a model in
some way, an entry in the model-window menu. This has been in
the code-base for some months but I haven't found time to
write it up yet. I'll try to get to that before long, but in
the meantime here's an example, from the .spec file for
the PPtest package:
label = Phillips-Perron test
menu-attachment = MAINWIN/Variable/URTests
gui-main = GUI_PP
This offers a menu item named "Phillips-Perron test" (from the
"label" field), to appear at MAINWIN/Variable/URTests. The
"MAINWIN" bit, as you might imagine, just tells gretl we're
talking about the main window menus. The path
"Variable/URTests" is constructed based on the UI definition
file gretlmain.xml
http://gretl.cvs.sourceforge.net/viewvc/gretl/gretl/gui2/gretlmain.xml?vi...
Selecting the "Phillips-Perron test" menu item launches the
package's "gui-main" function.
Allin Cottrell