2022-09-07 11:23 PM
I'm trying to generate a callback for tracking the progress bar updates. For this purpose I would like to use "setValueUpdatedAction" or "setValueSetAction" functions (which are defined in library). However I couldn't generate the callback or handler. Please share the callback and handler template with me!
2022-09-08 01:20 AM
Hello @JJGok ,
I understand what you wanna do, but why not simply implementing the handleTickEvent() method and read your ProgressBox values then at each tick, by calling the getValue() function ?
That could be a easy way to achieve what you want.
/Yoann
2022-09-08 02:02 AM
Thank you for your answer,
Normally, I'm doing the handleTickEvent() method, however with my current experience, using callbacks/handlers is making the system more efficient or reliable. While controlling or/and updating more than 1 variable in handleTickEvent(), in the simulator there is no problem. However, if you debug it, the refresh rates or going low ( it is related to the hardware too of course).
I hope I was able to explain my problem.
2022-09-08 06:02 AM
I haven't used these, but if you are unfamiliar with how to set up callbacks in general, take a look at the ScrollList example provided withTouchGFX Designer. It can also be helpful to get it working in simulation and use touchgfx_printf() calls (needs <touchgfx/Utils.hpp>) in your callback functions to make sure it is working properly. Just put the #ifdef SIMULATOR around the function calls.
2022-09-08 10:51 PM
Thank you for your answer.
I might have checked that when encountered the refresh rate problem and I am using most of the callbacks right now. They are working pretty well. However, in my case, I need to generate a different kind or I couldn't figure out how I am going to use it.
For example:
1)For move animation (if you change the MoveAnimator to FadeAnimator it works with it too.)
Callback<View, const MoveAnimator<Container>&> CALLBACKNAME;
void CALLBACKHANDLERNAME(const MoveAnimator<Container> &box);
GenericCallback<const MoveAnimator<T>&>& callback ==> This is the template of the callback
2)For scroll wheel end animation
void ScrollWheelAnimationDoneCallBackHandler();
Callback<SplashScreenView> ScrollWheelAnimationDoneCallBack;
GenericCallback<>& callback ==> This is the template of the callback
3)In my case
"GenericCallback<const AbstractProgressIndicator&>& callback" is the template, however, couldn't work it out.