Skip to main content
M3R
Associate II
Solved

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

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.
JPeča.1
JPeča.1Best answer
Associate

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

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

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

Alexandre RENOUX
Visitor II

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