Avaliação do Usuário

Estrela inativaEstrela inativaEstrela inativaEstrela inativaEstrela inativa
 

__objGetMsgList()

Return names of all VAR or METHOD for a given object
Syntax
__objGetMsgList( <oObject>, [<lData>], [nClassType] ) --> aNames
Argument(s)
<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:
table> hboo.ch Meaning
HB_MSGLISTALL All types HB_MSGLISTCLASS CLASS VAR only HB_MSGLISTPURE VAR only /table>
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.
Example(s)
// 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
Status
Ready
Compliance
This is Harbour specific
File(s)
Header file is hboo.ch Library is core
See also

__objGetMethodList(), __objGetValueList(), __objHasData(), __objHasMethod()