Tottel
Member
|
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.
Thanks!
|
|
01-29-2016 06:17 PM |
|
Esenthel
Administrator
|
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 |
|