2023-07-05 04:24 AM
Hi,
I'm trying to send an event when a button is clicked.
I have added an interaction in Touchgfx designer to call a virtual function when the button is clicked.
In Screen1view.cpp I'm overwriting the virtual function
void SendDataOnButtonClicked()
{
presenter->SetMode();
}
in presenter.cpp
void Screen1Presenter::SetMode()
{
model->SendEvent();
}
In Model.cpp
Solved! Go to Solution.
2023-07-05 04:41 AM - edited 2023-07-05 04:44 AM
Hello. Method 2 is correct. There must some simple problem at hpp file maybe ... This 'void SendDataOnButtonClicked()' must be of course 'void Screen1View::SendDataOnButtonClicked()'.
What is the exact error ?
Here you can get simple example of MVP communication in both directions:
2023-07-05 04:41 AM - edited 2023-07-05 04:44 AM
Hello. Method 2 is correct. There must some simple problem at hpp file maybe ... This 'void SendDataOnButtonClicked()' must be of course 'void Screen1View::SendDataOnButtonClicked()'.
What is the exact error ?
Here you can get simple example of MVP communication in both directions:
2023-07-05 04:53 AM
Thank you so much @JTP1 .
Your solution helped.