PEMSTATUS()

From Lianjapedia
Jump to: navigation, search

Purpose

Function to check whether an object has a specified property, method or event

Syntax

PEMSTATUS(<object-ref>, <expC>, 5)

See Also

ACLASS(), ADDPROPERTY(), AMEMBERS(), COMPOBJ(), CREATEOBJECT(), DEFINE CLASS, DISPLAY CLASSES, DODEFAULT(), FOREACH, LIST CLASSES, LOADOBJECT(), NEWOBJECT(), OBJECT(), PRINT_HTML(), PRINT_JSON(), PRINT_R(), PRINT_XML(), REMOVEPROPERTY(), REQUIRE_ONCE(), SAVEOBJECT(), SQL SELECT, WITH

Description

The PEMSTATUS() function is used to check whether the object <object-ref> has the property, method or event specified in <expC>.

PEMSTATUS() returns .T. (true) if the object has <expC> and .F. (false) if not.

Example

define class Product as custom
	productname = "Lianja App Builder"
	version = "1.0"
	proc getver
		? this.version
	endproc
enddefine
 
oProduct = createobject("Product")
oProduct.getver()
 
? pemstatus(oProduct,"productname",5) // .T.
? pemstatus(oProduct,"getver",5)      // .T.
? pemstatus(oProduct,"notthere",5)    // .F.