# __objAddData()

Add a DATA to an already existing class

Syntax

  __objAddData( <oObject>, <cDataName> ) --> oObject

Arguments

  <oObject> is the object to work on.
  <cDataName> is the symbol name of the new DATA to add.

Returns

  __objAddData() return a reference to <oObject>.

Description

  __objAddData() is a low level class support function that add a new DATA to an object. <oObject> is unchanged if a symbol with the name <cDataName> already exist in <oObject>.

Examples

          // create a new THappy class and add a lHappy DATA
          oHappy  := HBClass():New( "THappy" )
          __objAddData( oHappy, "lHappy" )
          oHappy:lHappy := .T.
          IF oHappy:lHappy
             ? "Happy, Happy, Joy, Joy !!!"
          ELSE
             ? ":(..."
          ENDIF

Status

  Ready

Compliance

  __objAddData() is a Harbour extension.

Files

  Library is rtl

See Also

- __objAddInline()
- __objAddMethod()
- __objDelData()
- __objGetMsgList()
- __ObjGetValueList()
- __objHasData()
- __ObjSetValueList()