Template
Function
Name
__objGetMsgList()
Category
API
Subcategory
Objects
Oneliner
Return names of all VAR 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 VAR 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 VAR 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 shows the values for <nClassType> that allow you to distinguish between VAR and CLASS VAR:
hboo.ch Value Meaning ---------------- ----- ----------------- HB_MSGLISTALL 0 All types HB_MSGLISTCLASS 1 CLASS VAR only HB_MSGLISTPURE 2 VAR only
VAR are instance variable usable within each object from a class, where each object has its own VARs.
CLASS VAR are shared by all objects from a Class, so the changed value within Object1 will be reflected when accessing the CLASS VAR 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 ) ? "VAR name:", aData[ i ] NEXT FOR i := 1 TO Len( aClassData ) ? "CLASS VAR name:", aClassData[ i ] NEXT FOR i := 1 TO Len( aMethod ) ? "METHOD name:", aMethod[ i ] NEXT
Compliance
Harbour
Files
Header file is hboo.ch
Library is core
Seealso
__objGetMethodList(), __objGetValueList(), __objHasData(), __objHasMethod()
Pingback: Harbour Internal Functions | Viva Clipper !
Pingback: Harbour Objects Functions | Viva Clipper !
Pingback: Harbour RG Summary | Viva Clipper !