-->
Page 2 of 3

Re: Adding ticker callback function error

PostPosted: Tue May 10, 2016 4:33 pm
by martinayotte
Unfortunately, this is again related to the "this" pointer, which you don't have in the case of static method.

Re: Adding ticker callback function error

PostPosted: Tue May 10, 2016 4:36 pm
by frischevollmilch
So that means I will have to completely change the way I do this part of my project?

Re: Adding ticker callback function error

PostPosted: Tue May 10, 2016 5:18 pm
by martinayotte
Maybe, but I'm not sure since I don't have the whole view ...
If you add an argument to attach(), then you can pass the "this" of the object, and you won't need the handler to be static anymore.

Re: Adding ticker callback function error

PostPosted: Tue May 10, 2016 11:34 pm
by Pablo2048
Look into ticker.cpp - there is
Code: Select allvoid attach(float seconds, void (*callback)(TArg), TArg arg)

so maybe You can give it a try... (and there is also TickerParameter example...)