maimonides Posted March 30, 2013 Posted March 30, 2013 I have this situation class X { void foo() { ... } } X xinst=new X(); and ui file with <callback type="clicked">xinst.foo</callback> But, i get the can't find callback function error. Any help? Thanks.
ulf.schroeter Posted March 30, 2013 Posted March 30, 2013 Not sure, but you cannot call class instance functions directly, only static functions. Have a look into UNIGINE editor script code in <sdk-root>/data/core/editor, there should be plenty of examples for your use case.
manguste Posted April 1, 2013 Posted April 1, 2013 David, Please check sample/widgets/ui_00 to see how to call class method and pass an instance.
maimonides Posted April 3, 2013 Author Posted April 3, 2013 Thank you. Solved. It's not pretty, but works fine.
Recommended Posts