Skip to main content
M3R
Associate II
August 26, 2020
Solved

how to use two callback in screenViewBase::screenViewBase() ?

  • August 26, 2020
  • 3 replies
  • 1119 views

hello

i want to used clicklistener and button callback.

how to wrote this two callback in screenViewBase?

screenViewBase::screenViewBase() :
	buttonCallback(this, &screenViewBase::buttonCallbackHandler)
	boxClickedCallback(this, &screenViewBase::boxClickHandler)
{
........
}

like this

i'm new in c++ language

This topic has been closed for replies.
Best answer by JPeča.1

Hi, I do not know if it right way, but I did it like this:

Screen1View::Screen1View():imageFadeAnimationEndedCallback(this, &Screen1View::imageFadeAnimationEndedHandler),
image2FadeAnimationEndedCallback(this, &Screen1View::image2FadeAnimationEndedHandler),
image3FadeAnimationEndedCallback(this, &Screen1View::image3FadeAnimationEndedHandler)
{	

Best regards.

Jan

3 replies

JPeča.1
JPeča.1Best answer
Associate
August 26, 2020

Hi, I do not know if it right way, but I did it like this:

Screen1View::Screen1View():imageFadeAnimationEndedCallback(this, &Screen1View::imageFadeAnimationEndedHandler),
image2FadeAnimationEndedCallback(this, &Screen1View::image2FadeAnimationEndedHandler),
image3FadeAnimationEndedCallback(this, &Screen1View::image3FadeAnimationEndedHandler)
{	

Best regards.

Jan

M3R
M3RAuthor
Associate II
August 26, 2020

Yes,Thanks a lot JPe�?a.1.

Alexandre RENOUX
Visitor II
August 27, 2020

Hello,

Yes what @Jan Pe�?a​ said is correct.

Also, never try to modify ScreenViewBase. It's a file generated by TouchGFX so all your modifications will be overwritten when you regenerate code.

The file that can be edited by the user is ScreenView as mentioned for the solution.

/Alexandre