About Store Forum Documentation Contact



Post Reply 
Callback with parameters
Author Message
Tottel Offline
Member

Post: #1
Callback with parameters
Hi there,

I was wondering if it's possible to send a simple object (like an int) as a parameter of a Callback.

It doesn't seem like it right now, and it would be nice to have. smile

Thanks!
01-29-2016 06:17 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Callback with parameters
Hi,

Do you mean the C++ 'Callbacks' class?

You can always create a object having all the parameters needed:
Code:
class CallParams
{
   int a,b;
  ..
}
and do:
CallParams cp; // <- this needs to be alive until callbacks finish processing (which means you can't keep it locally, but somewhere else !!
Callbacks.add(func, cp);
01-30-2016 08:03 AM
Find all posts by this user Quote this message in a reply
Post Reply