Difference between revisions of "REMOVEPROPERTY()"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 1: Line 1:
=REMOVEPROPERTY()=
 
 
 
 
==Class==
 
==Class==
 
Objects
 
Objects
Line 15: Line 12:
  
 
==See Also==
 
==See Also==
[[CLASS]], [[DEFINE CLASS]], [[METHOD]], [[WITH]], [[ACLASS()]], [[ADDPROPERTY()]], [[AMEMBERS()]], [[COMPOBJ()]], [[CREATEOBJECT()]], [[DODEFAULT()]], [[NEWOBJECT()]], [[SET CLASSLIBRARY]]
+
[[ACLASS()]], [[ADDPROPERTY()]], [[AMEMBERS()]], [[CLASS]], [[COMPOBJ()]], [[CREATEOBJECT()]], [[DEFINE CLASS]], [[DODEFAULT()]], [[METHOD]], [[NEWOBJECT()]], [[SET CLASSLIBRARY]], [[WITH]]
  
  
Line 54: Line 51:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Objects]]
 +
[[Category:Objects Functions]]

Revision as of 09:54, 2 June 2009

Class

Objects


Purpose

Function to remove a property from an existing object


Syntax

REMOVEPROPERTY(<object-name> ,<expC>)


See Also

ACLASS(), ADDPROPERTY(), AMEMBERS(), CLASS, COMPOBJ(), CREATEOBJECT(), DEFINE CLASS, DODEFAULT(), METHOD, NEWOBJECT(), SET CLASSLIBRARY, WITH


Description

The Visual FoxPro compatible REMOVEPROPERTY() function is used to remove a property from an existing object. It returns .T. (True) if the property was successfully removed and .F. (False) otherwise.


Parameter Description
<object-name> The name of the object.
<expC> The name of the property to be removed.


Properties can be added using the ADDPROPERTY() function. All classes have an inbuilt ADDPROPERTY 'factory method'. This can be used as an alternative to the ADDPROPERTY() function to add properties to an object at runtime.


Example

define class myclass as custom
myprop = "Hello World"
enddefine
 
myobject = createobject("myclass")
Messagebox(myobject.myprop)
addproperty(myobject, "myprop2", "goodbye")
// Or: myobject.addproperty("myprop2", "goodbye")
Messagebox(myobject.myprop2)
removeproperty(myobject, "myprop2")


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer