maimonides Posted March 30, 2013 Share 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. Link to comment
ulf.schroeter Posted March 30, 2013 Share 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. Link to comment
manguste Posted April 1, 2013 Share Posted April 1, 2013 David, Please check sample/widgets/ui_00 to see how to call class method and pass an instance. Link to comment
maimonides Posted April 3, 2013 Author Share Posted April 3, 2013 Thank you. Solved. It's not pretty, but works fine. Link to comment
Recommended Posts