Hello,

I want to call methods from an object dynamically.
Let's say I have a container including strings. The strings are
methodnames of an object. Now I want to go through the container and
sending each method to the object.

What is the construction for that ?

With a table and fieldIds it is easy:

Container fieldIds;
CustTable  cust;

fieldIds = conPoke(fieldIds, conLen(fieldIds)+1, fieldNum(cust,
Name));
fieldIds = conPoke(fieldIds, conLen(fieldIds)+1, fieldNum(cust,
Address));
.....

all fieldIds are in the container. To make a call to a custtable I do:

for(i = 1; i <= conLen(fieldIds); i++)
{
  fieldId = conPoke(fieldIds, i);
  info(strfmt("FieldId %1 Value: %2", fieldId, custTable.(fieldId)));
}

So with fieldIds I do the call: table.(fieldId)
but how do I do it with methods ?
object.methodName ?? That is a syntax error.

Regards

Manfred







Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to