Skip to main content
AD�?b
Senior
January 7, 2020
Question

Can I name the screen ADJUST and Box With Border adjust?

  • January 7, 2020
  • 3 replies
  • 1745 views

I have a problem with Tutorial 2. I don't want to add the counter after pressing. Does not work after implementation " Using a wildcard text " ?

This topic has been closed for replies.

3 replies

Martin KJELDSEN
Principal III
January 8, 2020

To answer your first question: Yes, you can. Because the screen name will become classes ADJUSTView, ADJUSTPresenter, so there will be no name clashes.

Your second question, please elaborate, it's a bit unclear to me,

/Martin

AD�?b
AD�?bAuthor
Senior
January 8, 2020

Thank you with your reply. I had a confused function name.

AD�?b
AD�?bAuthor
Senior
January 8, 2020

How to display a variable on the screen. I created text <value>. How do I associate this with my variable "counter" and update it on a regular basis. The variable is global.

Martin KJELDSEN
Principal III
January 9, 2020
AD�?b
AD�?bAuthor
Senior
January 9, 2020

Hi Martin

Studied. A bit different from my need. My variable "counter" is set in the file "main.cpp" and not from buttons. Will it be seen in other files?

Bob Bailey
Senior
January 9, 2020

Another community member made a youtube video on how to do this. There are TouchGFX documents as well, but the video was enough to get me going

https://www.youtube.com/watch?v=majcfxr3u2E

in main.cpp in whatever task, variable gets put into a queue

in the model.cpp in the gui the data is received from the queue and passed to the presenter, which passes it to the view. (I think I got that right)

i believe you could access the data right from the view, but I think that will cause you problems later on.

Basically there is a structure to TouchGFX and its best to follow it. By using a queue you keep the GUI thread/task and your main task from accessing the variable at the same time, which is a good idea with the RTOS.

There is a similar process for sending gui data back to the main logic.

Be sure to put your code changes in the main.cpp between the user code start and end comments.

Bob

AD�?b
AD�?bAuthor
Senior
January 9, 2020

Thanks Bob. I will study it.