PhabReadWidget

PhabReadWidget — reads widgets (for internal use).

Syntax

PhabReadWidget (file)

		

Arguments

file

A file pointer to a previously opened file.

Returns

A widget pointer, as a list, or nil.

Description

This function is mainly used internally, supporting other functions such as PhabReadWidgets and PhabReadWidgetFile.

Example

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)

See Also

PhabReadWidgetFile, PhabReadWidgets