PhabNameWidgets

PhabNameWidgets — assigns global variables to widget names.

Syntax

PhabNameWidgets(hierarchy)

		

Arguments

hierarchy

The widget hierarchy to which global variables will be assigned.

Returns

Doesn't return any useful value.

Description

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").

Example

This example, ex_PhabNameWidgets.g, is included in the product distribution.

#!/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(string(_os_, "-WidgetFiles/wgt/loadwindow.wgtw"));
win = PhabCreateWidgets(file,nil,nil);
PhabNameWidgets(win);
PtRealizeWidget(MainWindow);

PtMainLoop();

See Also

PhabLoad