CronAlarms icon indicating copy to clipboard operation
CronAlarms copied to clipboard

Hand over arguments to the callback function

Open probonopd opened this issue 1 year ago • 2 comments

In #9, someone asked how to specify arguments to the called function.

Another question: is there a way to overgive arguments to the called function?

Martin-Laclaustra commented on Dec 31, 2020 You could create member variables in your class that can be accessed from the called function. Changing the called function signature would require changes to the library code.

Can you please give an example how to do that?

probonopd avatar Apr 16 '23 10:04 probonopd

+1

karelv avatar Jan 20 '24 18:01 karelv

I do not understand the question. If you create a class and pass the pointer of your class function to cronalarms, such function could access any member variable of your class.

Martin-Laclaustra avatar Jan 20 '24 18:01 Martin-Laclaustra