IsFakeObject - Check a value for being a Fake Object

Top  Previous  Next

Syntax

<lValue> := IsFakeObject(<testvalue>)

Parameters

<testvalue>

 

The value to test for being a fake object.

Return value

If <testvalue> is a fake object, the return value is .T., otherwise it is .F.

Description

IsFakeObject first checks if <testvalue> is an object. If not, it immediately returns .F. . If <testvalue> inherits from the IdentifyAsFakeObject class, it returns .T. .

Classification

Core

Category

Type check

Quick Info

Library: cckptcor.lib /cckptcor.dll

See also

IdentifyAsFakeObject, HandleOf

Example

 

* Auto-link the Cockpit Core libraries

#INCLUDE "CockpitCoreLibs.ch"

 

* Declare a class that inherits from IdentifyAsFakeObject

CLASS MyFakeObject FROM IdentifyAsFakeObject

ENDCLASS

 

 

FUNCTION Main

 

LOCAL fo := MyFakeObject():New()

 

* Check the object for being a fake object

IF IsFakeObject(fo)

  ? "fo is a fake object."

ENDIF

 

RETURN NIL