DISPATCH PROPSET()

From Recital Documentation Wiki
Revision as of 12:47, 27 March 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PURPOSE

A macro to dispatch a set property method passed to the object


SYNONYM

None


SYNOPSIS

#include "dbapi.h"
 
DISPATCH_PROPSET(classname, propertyname)
 
<input parameters>
constant		classname;	/* Class name that contains the property	*/
constant		propertyname;	/* Property name to dispatch set method	*/
 
<output parameters>
none


DESCRIPTION

The DISPATCH_PROPSET() macro is used to dispatch a method that sets the value of a specified property passed to the object. After a method is dispatched by this macro, execution is returned to Recital.


EXAMPLE

The following example adds a DISPATCH_PROPSET() macro to set the value of the property NumValue in a class called clsMyClass.

Example Recital program:

test = newobject("myclass")
// Set the value of the property NumValue
test.numvalue = test.numvalue * 5

Example in 'C' object:

#include "dbapi.h"
 
DEFINE_CLASS(clsMyClass)
{
	/* Dispatch factory methods and return */
	DISPATCH_FACTORY();
 
	/* Dispatch SET or GET PROPERTY  */
	/* method for property NumValue	*/
	/* then return.				*/
	DISPATCH_PROPSET(clsMyClass, NumValue);
	DISPATCH_PROPGET(clsMyClass, NumValue); 
}


SEE ALSO

DEFINE_CLASS(), DEFINE_METHOD(), DEFINE_PROPERTYGET(), DEFINE_PROPERTYSET(), DISPATCH_FACTORY(), DISPATCH_METHOD(), DISPATCH_PROPGET(), OBJECT_ASSIGN(), OBJECT_DELETE(), OBJECT_GETARG(), OBJECT_GETARGC(), OBJECT_GETDATA(), OBJECT_GETOBJECT(), OBJECT_GETPARAMETER(), OBJECT_GETPROPERTY(), OBJECT_GETTYPE(), OBJECT_GETVALUE(), OBJECT_NEW(), OBJECT_RETERROR(), OBJECT_RETPROPERTY(), OBJECT_RETRESULT(), OBJECT_SETARG(), OBJECT_SETDATA(), OBJECT_SETPROPERTY()