2024-10-17 03:14 PM
Hi there Touchgfx team!
I have a header that contains a textarea "date" acrros different screens. The idea is that the model reads the "date" from the backend RTC and expose the get/set methods, for all screens to read it.
I created this in my model:
const char* get_date() const
{
return date;
}
const char *date = "MON 01 / 01:23 AM";
I can confirm the "date" arrives correctly to other screens by using touchgfx_printf. The problem is that once I try to update the textarea wildcard it appears as a "?" in the real screen. The ranges wildcards are ok.
Also, since this date its not const, I think I will need a string but I'm not sure how to implement it on Touchgfx.
Thanks a lot in advance
Solved! Go to Solution.
2024-10-18 05:53 AM
Hi, I was using the textarea.setWildcard but decided to directly use the buffer like this
Unicode::strncpy(header_date_textBuffer, presenter->get_date(), HEADER_DATE_TEXT_SIZE);
It works now
2024-10-18 02:32 AM
Hello again @JPabl.1,
How do you set the data to the textArea ?
BR,
2024-10-18 05:53 AM
Hi, I was using the textarea.setWildcard but decided to directly use the buffer like this
Unicode::strncpy(header_date_textBuffer, presenter->get_date(), HEADER_DATE_TEXT_SIZE);
It works now