__objGetMsgList()

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()

3 responses to “__objGetMsgList()

  1. Pingback: Harbour Internal Functions | Viva Clipper !

  2. Pingback: Harbour Objects Functions | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.