
84 Appendix A3 Modelbase and OxPack
Return value
Returns an array of which each item is an array of two strings: menu command
text, followed by the menu command identifier. Returns 0 if the menu is not
implemented.
Description
Called by OxPack to determine the content of the Te st menu (sMenu equals
"Test"). For example, the Arfima class uses:
if (sMenu == "Test")
{ return
{{ "&Graphic Analysis", "OP_TEST_GRAPHICS"},
{ "&Forecast...", "OP_TEST_FORECAST"},
0,
{ "&Test Summary", "OP_TEST_SUMMARY"},
0,
{ "Exclusion Restrictions...", "OP_TEST_SUBSET"},
{ "Linear Restrictions...", "OP_TEST_LINRES"}
};
}
The ampersand in the command text indicates a short-cut character (will be un-
derscored in the menu). The ellipse is used to indicate to the user that a dialog
will follow. The entry of 0 paints a separator between menu items.
The menu identifier is first passed to SendDialog() to allow the package to
implement a dialog (or return 0 to skip the dialog). Then it is passed to
ReceiveDialog() to execute the action.
The OP
TEST...identifiers used in the example are predefined, allowing a con-
nection to the toolbar buttons. (However, other identifiers may also be used.) The
complete list of predefined identifiers is:
"OP TEST GRAPHICS" Graphic Analysis
"OP
TEST GRAPHREC" Recursive Graphics
"OP
TEST FORECAST" Forecasts
"OP
TEST DYNAMICS" Dynamic Analysis
"OP
TEST TEST" Test... (choose from a dialog)
"OP
TEST SUMMARY" Test Summary
"OP
TEST SUBSET" Exclusion Restrictions
"OP
TEST LINRES" Linear Restrictions
"OP
TEST GENRES" General Restrictions
The last three entries are special, in that predefined dialogs ap-
pear. The subsequent restrictions test is a Wald test implemented via
Modelbase::TestRestrictions().
When sMenu equals "ModelClass", OxPack allows setting of model classes
at the top of the Model menu. Up to 16 are allowed, and their identifiers are
"modelclass0", "modelclass1", etc.. For example:
if (sMenu == "ModelClass")
{
return
Komentarze do niniejszej Instrukcji