PhabReadWidget

Gamma/Photon: Using Gamma™ with the Photon microGUIŽ, Version 4.0
Prev |  | Next

# `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 `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)

## See Also

PhabReadWidgetFile, PhabReadWidgets

Prev | Home | Next
`PhabNameWidgets` | Up | `PhabReadWidgetFile`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.