I just noticed that class member function cannot be bound as FlexScript interface properly if passing string as parameter. For example, I create a member function as follows:
void printStr(string str) { pt(str); pr(); }
And I bind it in function bindInterface() as follows:
bindMethod(printStr, IntVector, "void printStr(string str)");
When I call the function in FlexSim by:
IntVector iv = IntVector.reset(so()); iv.printStr("abc");
FlexSim either crashes or prints something weird. When I debug it, it shows that the string "abc" is not able to pass into member function properly. See the following images:
Source code is also attached here intvector.zip
Could you provide suggestions to fix it?
Thanks, Hao