bool Person::getValue (const skString& fieldName,const skString& attribute,skRValue& value)
{
if (fieldName=="Name"){
// the field "Name" is visible to Simkin scripts
value=m_Name;
return true;
// this means "field found"
}else
return skExecutable::getValue(fieldName,attribute,value);
}
bool Person::setValue (const skString& fieldName, const skString& attribute,const skRValue& value)
{
if (fieldName=="Name"){
// the field "Name" is visible to Simkin scripts
m_Name=value;
return true;
// this means "field found"
}else
return skExecutable::setValue(fieldName,attribute,value);
}
bool Person::method (const skString& methodName, skRValueArray& arguments,skRValue& returnValue)
{
if (methodName=="Mail"){
skString message=args[0].str();
returnValue=MyEmailClass::sendEmail(m_EmailAddress,message);
// call my email class to actually send the message
return true;
}else
return skExecutable::method(methodName,arguments,returnValue);
}