I have a number of instances of the same class. I want to be able to use the same method on all of them. So, I wrote the following:
chai.add(chaiscript::fun(static_cast<void (Foo::*)(int, float)>(&Foo::setParameter)), “setParameter”); // add method
chai.add(chaiscript::var(std::ref(ap)), “Filt”); // add object
No errors adding them but when I try to invoke a call, e.g.
I get the error, Script error in script:Error: “Can not find object: Filt” during evaluation at (EVAL 30, 10)
What am I doing wrong, please?