This function walks a widget hierarchy and creates global variables of the same name as, and referring to, each of the widgets in the hierarchy that has a name.
To use this function, you must load the PhabTemplate.lsp library with a call to require_lisp("PhabTemplate.lsp").
This example, ex_PhabNameWidgets.g, is included in the gamma_ph_#_examples_1_QNX4.tgz file available on the Cogent Web Site.
#!/usr/cogent/bin/phgamma
/*
This example loads and displays a window, as in the example for
PhabLoad(). But here we use each function separately, including
PhabNameWidgets().
*/
PtInit(nil);
require_lisp("PhabTemplate.lsp");
file = PhabReadWidgetFile("WidgetFiles/wgt/loadwindow.wgtw");
win = PhabCreateWidgets(file,nil,nil);
PhabNameWidgets(win);
PtRealizeWidget(MainWindow);
PtMainLoop();