__objGetMsgList()
Return names of all DATA or METHOD for a given object
- Syntax
-
- __objGetMsgList( <oObject>, [<lData>], [nClassType] ) --> aNames
- Arguments
-
- <oObject> is an object to scan.
- <lData> is an optional logical value that specifies the information to return. A value of .T. instruct the function to return list of all DATA names, .F. return list of all METHOD names. Default value is .T.
- <nClassType> is on optional numeric code for selecting which class type to return. Default value is HB_MSGLISTALL, returning the whole list.
- Returns
-
- __objGetMsgList() return an array of character stings with all DATA names or all METHOD names for a given object. __objGetMsgList() would return an empty array {} if the given object does not contain the requested information.
- Description
-
- __objGetMsgList() is a low level class support function that let you find all instance variable or method names for a given object.
- If specified, the following table shoes the values for <nClassType> that allow you to distinguish between DATA and CLASSDATA:
hboo.ch | Value Meaning |
|
HB_MSGLISTALL | 0 All types |
HB_MSGLISTCLASS 1 | CLASSDATA only |
HB_MSGLISTPURE | 2 DATA only |
- DATA are instance variable usable within each object from a class, where each object has its own DATAs.
- CLASSDATA are shared by all objects from a Class, so the changed value within Object1 will be reflected when accessing the CLASSDATA from Object2.
Examples
// show information about TBrowse class
oB := TBrowseNew( 0, 0, 24, 79 )
aData := __objGetMsgList( oB, .T. )
aClassData := __objGetMsgList( oB, .T., HB_MSGLISTCLASS )
aMethod := __objGetMsgList( oB, .F. )
FOR i = 1 to len ( aData )
? "DATA name:", aData[ i ]
NEXT
FOR i = 1 to len ( aClassData )
? "CLASSDATA name:", aClassData[ i ]
NEXT
FOR i = 1 to len ( aMethod )
? "METHOD name:", aMethod[ i ]
NEXT
- Status
- Ready
- Compliance
-
- __objGetMsgList() is a Harbour extension.
- Files
-
- Header file is hboo.ch Library is rtl
- See Also