Jump to content

[SOLVED] Example of C++ class member callback?


photo

Recommended Posts

Is there an example / sample showing how to create callback for a class member function? The sample included in the SDK browser only seems to cover static functions. I can include 'this' pointer as an argument to static function and call the member function from there, but this is not ideal.

Link to comment

Hi,

 

I didn't found the example either, perhaps we should add one.

You can do it this way:

body->setContactCallback(MakeCallback(this, &AppWorldLogic::on_contact));
Link to comment
  • 2 weeks later...
×
×
  • Create New...