2020-07-01 09:33 AM
Hello to everyone,
I was able to add a backend communication from a screen to other FreeRTOS task with a queue message and now I try the other way from the other task to the screen/view.
I add all the parts from the TGFX support site backend-communication to the model and so on, but I'm not able to access to this specific text area (wildcard) because it's a "protected member" of the custom container class.
Maybe it's just a easy problem but because of my poor C++ knowledge I don't find a solution for this problem.
How I get access to a protected custom container member (text area) which is placed on a screen?
Maybe someone can help me with some hints or code snippets.
Thank you in advance.
Solved! Go to Solution.
2020-07-02 05:52 AM
Hi,
Make a public setTemp function in your sliderContainer
Change the setTemp function in your main screen.
/Thomas
2020-07-01 05:06 PM
How are you accessing the text area? Can you show some code? You could simply add a function in your custom container class that sets the value of the text area.
/Martin
2020-07-02 12:58 AM
Hi Martin,
thanks for your fast response.
I created now a new TGFX project with the STM32F769I Disco with just this backend communication. If you want I can also upload the whole folder.
The problems are in the mainscreenview.cpp -> line 25+26 and in the mainScreenPresenter.hpp -> line 34 (I forget to mention this yesterday).
I add the error message in a comment nearby.
2020-07-02 01:15 AM
Hi @H S
Thanks for the update. Crunching **** ** release 4.14.0 at the moment so i can't spare the time to look at projects. I'll try to get back to you asap :)
/Martin
2020-07-02 05:52 AM
Hi,
Make a public setTemp function in your sliderContainer
Change the setTemp function in your main screen.
/Thomas
2020-07-02 06:31 AM
Hi TDahl,
thanks for your answer. It sounds afterwards so easy but I think to complicated...
Can you maybe help me also with the second problem with the presenter?
What do I have do insert here instead of 'view' because it doesn't work (see the error message at the right).
Do I also need a setTemp function in the presenter?
Excuse me for my stupid questions but I need just one working example to understand it.
2020-07-02 06:36 AM
No problem Martin, I know you are very busy.
You and the other guys from TGFX do a great job!
Thanks for this!
2020-07-02 06:44 AM
Thanks! That means a lot to us :) I'm not sure why the forum sensored me in that last post, or even what i wrote, haha.
2020-07-02 08:30 AM
Looks right to me. Is the error in the presenter not caused be the access error in the view? When you have corrected the view, will the error in presenter not disappear?
2020-07-03 12:55 AM
The first error with the "protected member" is fixed now but the second error from my post above is sadly still present.
The point between "view" and "setTemp" is marked red for this error.