Displays information about an object or a group of objects.
DISPLAY OBJECTS [LIKE cObjectSkeleton] [TO PRINTER [PROMPT] | TO FILE FileName [ADDITIVE]] [NOCONSOLE]
- LIKE cObjectSkeleton
Displays information about a subset of objects. cObjectSkeleton is an object specification skeleton that supports wildcards (* and ?). For example, to display all objects that begin with A, use the following command:
В Copy Code
DISPLAY OBJECTS LIKE A*
- TO PRINTER [PROMPT]
- Directs output from DISPLAY 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 DISPLAY OBJECTS to the 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.
- Appends to the end of the named file. If you omit ADDITIVE, then the file is overwritten with the value of the expression.
- Suppresses output to the main Visual FoxPro window or to the active user-defined window.
DISPLAY OBJECTS displays the following information about all existing objects:
Properties and their values.
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.
DISPLAY OBJECTS fills the entire main Visual FoxPro window or user-defined window with information and then pauses. Press any key or click anywhere to see the next set of information. DISPLAY is similar to LIST, except that LIST displays the same information in a continuous stream without pausing.
The following example uses DEFINE CLASS and CREATEOBJECT(В ) to create two custom classes named FormChild and FormGrandChild from the Visual FoxPro Form base class. DISPLAY OBJECTS displays information about the objects and their properties.
CLEAR frmMyForm = CREATEOBJECT("FormGrandChild") DISPLAY OBJECTS LIKE frm* RELEASE frmMyForm DEFINE CLASS FormChild AS FORM ENDDEFINE DEFINE CLASS FormGrandChild AS FormChild ENDDEFINE