This function is mainly used internally, supporting other functions such as PhabReadWidgets and PhabReadWidgetFile.
This example, ex_PhabReadWidget.g, is included in the gamma_ph_#_examples_1_QNX4.tgz file available on the Cogent Web Site.
The following code:
#!/usr/cogent/bin/phgamma
//This example reads the file: WidgetFiles/wgt/readtestfile.wgtw.
PtInit(nil);
fo = open("WidgetFiles/wgt/readtestfile.wgtw","r");
princ("The open file: \n", fo,"\n\n");
defs = PhabReadWidget(fo);
princ("PhabReadWidget gives you: \n", defs, "\n\n");
close(fo);
Generates the following output:
The open file:
#<File:WgtwReadFile/wgt/MyTestFile.wgtw>
PhabReadWidget gives you:
(0 PhAB113 1 nil)