PhabReadWidget (file)
This function is mainly used internally, supporting other functions such as PhabReadWidgets and PhabReadWidgetFile.
This example, ex_PhabReadWidget.g, is included in the product distribution.
The following code:
#!/usr/cogent/bin/phgamma /* This example reads the file: QNX4-WidgetFiles/wgt/readtestfile.wgtw * in QNX 4, and QNX6-WidgetFiles/wgt/readtestfile.wgtw in QNX 6. */ PtInit(nil); fo = open(string(_os_, "-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)
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.