Condividi tramite


LIST OBJECTS Command

Continuously displays information about an object or a group of objects.

LIST OBJECTS   [LIKE cObjectSkeleton]
   [TO PRINTER [PROMPT] | TO FILE FileName [ADDITIVE]]   [NOCONSOLE]

Parameters

  • LIKE cObjectSkeleton
    Displays information about a subset of objects. cObjectSkeleton is an object specification skeleton that supports wildcards (* and ?). For example, to continuously display all objects that begin with A, use the following command:

    LIST OBJECTS LIKE A*
    
  • TO PRINTER [PROMPT]
    Directs output from LIST OBJECTS to a printer.

    You can include the optional PROMPT clause to display a Print dialog box before printing starts. Place the PROMPT keyword immediately after TO PRINTER.

  • TO FILE FileName
    Directs output from LIST OBJECTS to the disk file specified with FileName. If the file already exists and SET SAFETY is ON, Visual FoxPro displays a prompt asking if you want to overwrite the file.

  • ADDITIVE
    Appends to the end of the named file. If you omit ADDITIVE, then the file is overwritten with the value of the expression.

  • NOCONSOLE
    Suppresses output to the main Visual FoxPro window or to the active user-defined window.

Remarks

LIST OBJECTS displays the following information about all existing objects:

  • Properties and their values.

  • Methods.

  • Member objects and the class or subclass on which they are based.

  • Class or subclass on which objects are based.

  • Class hierarchy for the objects.

LIST OBJECTS fills the entire main Visual FoxPro window without pausing.

Example

The following example uses DEFINE CLASS and CREATEOBJECT( ) to create two custom classes named FormChild and FormGrandChild from the Visual FoxPro Form base class. LIST OBJECTS lists information about the objects and their properties.

CLEAR
frmMyForm = CREATEOBJECT("FormGrandChild")
LIST OBJECTS LIKE frm*
RELEASE frmMyForm

DEFINE CLASS FormChild AS FORM
ENDDEFINE

DEFINE CLASS FormGrandChild AS FormChild
ENDDEFINE

See Also

Reference

DISPLAY OBJECTS Command

DEFINE CLASS Command

CREATEOBJECT( ) Function

Other Resources

Commands (Visual FoxPro)

Language Reference (Visual FoxPro)